Hi guys, I''m exploring the realm of web services and I can''t
work out if this is
possible.
If I return a Questionnaire object from an action, the relevant part of the SOAP
response looks like
<return n2:arrayType="n1:Questionnaire[1]"
xmlns:n2="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="n2:Array">
<item>
<id xsi:type="xsd:int">1</id>
<name xsi:type="xsd:string">Desserts</name>
<description xsi:type="xsd:string">A survey designed
to observe
current preferences for dessert foods</description>
<rubric xsi:type="xsd:string"></rubric>
</item>
</return>
Now, a Questionnaire intrinsically has_many :questions (Question objects), and
I''d like to be able to pass those in the same request - I
don''t think that SOAP
requires <item>s to be single depth, surely it would be a bit useless
using XML
in that case.
Ideally I would like a way to get the response looking something like the
following (or whatever Rails would require)
<return n2:arrayType="n1:Questionnaire[1]"
xmlns:n2="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="n2:Array">
<item>
<id xsi:type="xsd:int">1</id>
<name xsi:type="xsd:string">Kyanmedia
Desserts</name>
<description xsi:type="xsd:string">A survey designed
to observe
current preferences for dessert foods</description>
<rubric xsi:type="xsd:string"></rubric>
<questions>
<item>
<id xsi:type="xsd:int">1</id>
<!-- more Question data -->
</item>
</questions>
</item>
</return>
Similarly, would the same be possible with arguments to API functions (i.e.
passing in nested data from the remote point)?
Any references you can point me to would be appreciated :)
Gareth
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk
-~----------~----~----~----~------~----~------~--~---