Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7659313
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T13:19:00+00:00 2026-05-31T13:19:00+00:00

I am completely confounded by HTTParty’s XML parsing of seemingly identical XML. I am

  • 0

I am completely confounded by HTTParty’s XML parsing of seemingly identical XML. I am making the same GET call (get function parameters) to a web service, but to a different resource (/channels/3/functions/58/ vs. /channels/6/functions/106/). I am using HTTParty to make the call. The problem is that it is interpreting the results differently and I cannot find any differences in the returned XML that would explain the difference.

Here is what is happening in my first call to /channels/3/functions/58/

XML response:

<functionsResult xmlns="http://www.w3.org/2005/Atom">
<function>
    <id>58</id>
    <name>API: movies</name>
    <type>trigger</type>
    <description></description>
    <tags></tags>
    <status>active</status>
    <parameters>
        <parameter name="movie_query" label="Movie Query" type="xsd:string" required="false" default=""/>
        <parameter name="critics-pick" label="Critics Pick" type="xsd:string" required="false" default=""/>
        <parameter name="thousand-best" label="Thousand Best" type="xsd:string" required="false" default=""/>
        <parameter name="dvds" label="Dvds" type="xsd:string" required="false" default=""/>
        <parameter name="reviewer" label="Reviewer" type="xsd:string" required="false" default=""/>
        <parameter name="publication-date" label="Publication Date" type="xsd:date" required="false" default=""/>
        <parameter name="opening-date" label="Opening Date" type="xsd:date"      required="false" default=""/>
    </parameters>
    <link rel="self" title="This Function" method="GET" type="application/xml" href="/channels/3/functions/58/"/>
    <link rel="related" title="Function Channel" method="GET" type="application/xml" href="/channels/3/"/>
</function>
</functionsResult>

The hash that HTTParty gives me back is fine and looks like this (debug output):

functionsResult:
  function:
    id: '58'
    name: ! 'API: movies'
    type: trigger
    description: !!null 
    tags: !!null 
    status: active
    parameters:
      parameter:
      - name: movie_query
        label: Movie Query
        type: xsd:string
        required: 'false'
        default: ''
      - name: critics-pick
        label: Critics Pick
        type: xsd:string
        required: 'false'
        default: ''
      - name: thousand-best
        label: Thousand Best
        type: xsd:string
        required: 'false'
        default: ''
      - name: dvds
        label: Dvds
        type: xsd:string
        required: 'false'
        default: ''
      - name: reviewer
        label: Reviewer
        type: xsd:string
        required: 'false'
        default: ''
      - name: publication-date
        label: Publication Date
        type: xsd:date
        required: 'false'
        default: ''
      - name: opening-date
        label: Opening Date
        type: xsd:date
        required: 'false'
        default: ''
    link:
    - rel: self
      title: This Function
      method: GET
      type: application/xml
      href: /channels/3/functions/58/
    - rel: related
      title: Function Channel
      method: GET
      type: application/xml
      href: /channels/3/

The XML for the other resource is almost identical in its structure:

<functionsResult xmlns="http://www.w3.org/2005/Atom">
<function>
    <id>106</id>
    <name>search</name>
    <type>trigger</type>
    <description/>
    <tags/>
    <status>active</status>
    <parameters>
        <parameter name="callback" label="Callback" type="string" required="false" default=""/>
        <parameter name="geocode" label="Geocode" type="string" required="false" default=""/>
        <parameter name="lang" label="Lang" type="string" required="false" default=""/>
        <parameter name="locale" label="Locale" type="string" required="false" default=""/>
        <parameter name="page" label="Page" type="string" required="false" default=""/>
        <parameter name="result_type" label="Result Type" type="string" required="false" default=""/>
        <parameter name="rpp" label="Rpp" type="string" required="false" default=""/>
        <parameter name="show_user" label="Show User" type="string" required="false" default=""/>
        <parameter name="until" label="Until" type="string" required="false" default=""/>
        <parameter name="since_id" label="Since Id" type="string" required="false" default=""/>
        <parameter name="include_entities" label="Include Entities" type="string" required="false" default=""/>
    </parameters>
    <link rel="self" title="This Function" method="GET" type="application/xml" href="/channels/6/functions/106/"/>
    <link rel="related" title="Function Channel" method="GET" type="application/xml" href="/channels/6/"/>
</function>
</functionsResult>

However the hash that gets returned returns an empty array for ‘Parameters’ (debug output)!

functionsResult:
  function:
    id: '106'
    name: ! 'search'
    type: trigger
    description: !!null 
    tags: !!null 
    status: active
    parameters:
      parameter:
      - ''
      - ''
      - ''
      - ''
      - ''
      - ''
      - ''
      - ''
      - ''
      - ''
      - ''
    link:
    - rel: self
      title: This Function
      method: GET
      type: application/xml
      href: /channels/6/functions/106/
    - rel: related
      title: Function Channel
      method: GET
      type: application/xml
      href: /channels/6/

The only thing I can think of is that the parameters in the second GET call have underscores in some attributes??? That seems an unlikely explanation. Any help is much appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T13:19:01+00:00Added an answer on May 31, 2026 at 1:19 pm

    i assume that it might be a problem with xml namespaces. the first response seems to have a valid type attribute, while the latter misses the xsd:string namespace.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Completely new to asp.net mvc... completely new to web apps so bear with me...
Im completely new to Java web stuff, but here goes my question: 1) How
I completely fail to get dotnetzip to add files to a .zip file i
Which browser support REST completely? Means Get,Post,PUT and DELETE method? I understood the rails
Im completely new to XML/XSL/XSLT, and while i have been digging msdn, 3schools.com and
Completely new to using simple XML library in PHP, and have been using the
Completely new bee in web services. I am having the url as: http://abc.xyz.com/straw/api/?wsdl and
Completely new to java and I have been playing around with regex in a
Not completely a programming question, but its close enough so here goes: In Mac
I'm completely new to COBOL, but I'd like to take a look at the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.