# Help with multiple returns in SOAP

**URL:** <https://www.ruby-forum.com/t/help-with-multiple-returns-in-soap/114938>\
**Category:** Rails\
**Created:** [September 18, 2007, 11:40pm UTC](https://www.ruby-forum.com/t/help-with-multiple-returns-in-soap/114938 "2007-09-18T23:40:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tomasz\_Tomczyk](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/b487fb/32.png) [@Tomasz\_Tomczyk](https://www.ruby-forum.com/u/Tomasz_Tomczyk)\
**Post date:** [September 18, 2007, 11:40pm UTC](https://www.ruby-forum.com/t/help-with-multiple-returns-in-soap/114938/1 "2007-09-18T23:40:05Z")

</div>

Can anyone tell me how to push ActionWebService to create proper WSDL  
for multiple returns?  
My code looks like this:

class UserApi \< ActionWebService::API::Base  
api\_method :getuserinfo,  
:expects =\> [{:username =\> :string}, {:userpass =\> :string}],  
:returns =\> [[{:firstname =\> :string}, {:lastname =\> :string}]]  
end

The WSDL doesn’t include firstname and lastname names (only  
StringArray):

And of course generates output:

```
    <return n2:arrayType="xsd:string[2]"
        xmlns:n2="http://schemas.xmlsoap.org/soap/encoding/"
        xsi:type="n2:Array">
      <item>Tomasz</item>
      <item>Tomczyk</item>
    </return>

```

How can get into returns without having returns names in external soap  
client?  
Having WSDL like the one above I can only iterate throu items, which I  
think is not SOAP way.

Regards,  
Tomasz Tomczyk
