Forum: Ruby on Rails Issue with SOAP response XML format for Array Types with AWS

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
D3b4c4e5857f203807dd410526d8ad90?d=identicon&s=25 Piyush with Rails (Guest)
on 2009-03-13 08:23
(Received via mailing list)
Hi All,

There is an issue with AWS in SOAP response XML generated for Array

If we are using array types in signature at returns place, then in
SOAP response XML for this method array elements are represented with
<item> tags.

How can we give another meaningful tag name or give attribute (that
uniquely identify the tag) to the tags instead of <item> tag in the
response XML ??

Take below thing in consideration.

API signature for seach_products.

api_method :search_products,
   :expects => [:string],      // expects string input.
   :returns => [[Product]]      // returns array of strings.

Product Structure Class
class Product< ActionWebService::Struct
    member :id, :integer
    member :name, :string

Response XML Output.

<?xml version="1.0" encoding="UTF-8" ?>
<env:Envelope xmlns:xsd=""
    <n1:SearchProductsResponse xmlns:n1="urn:ActionWebService"
      <return n2:arrayType="n1:Product[2]"
          <id xsi:type="xsd:int">data 1-1</id>
          <name xsi:type="xsd:string">data 1-2</name>
          <id xsi:type="xsd:int">data 2-1</id>
          <name xsi:type="xsd:string">data 2-2</name>
    </n1:SearchProductsResponse >


Looking at the format of the XML it seems that AWS is using RPC
encoding style for WSDL and SOAP request and responses.

So taking above situation in consideration if we need to get <product>
tag instead of <item> tags in the SOAP response XML then how can we do
that ??

This topic is locked and can not be replied to.