Attributes for Soap elements

R

Roy Britten

Hi,

I'm accessing a web service that is largely using attributes rather
than elements for the request. How can I create a request containing
attributes?

I create the SOAP driver with

require 'soap/wsdlDriver'
driver = SOAP::WSDLDriverFactory.new(wsdlURL).create_rpc_driver

and can elicit appropriate responses from the server for requests that
pass the data as elements:

driver.getSomething:)foo=>"bar")

However, most requests require the data to be passed as attributes.
For example, a simplified WSDL reads in part

<element name="GetItem">
<complexType>
<sequence>
<element name="itemRequest" type="impl:GetItemRequest"/>
</sequence>
</complexType>
</element>
<complexType name="GetItemRequest">
<sequence/>
<attribute name="X" type="xsd:double"/>
<attribute name="Y" type="xsd:double"/>
</complexType>

How will I craft a request to the GetItem service with appropriate
values for X and Y?

Thanks,
Roy.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,982
Messages
2,570,186
Members
46,739
Latest member
Clint8040

Latest Threads

Top