from soap4r-ML
Hi,
I generate my SOAP client using wsdl2ruby.
But I have a little problem when the response is a complex type sequence.
In fact, as the object is quite complex (!), it is really difficult do
manipulate it. Basically, I would prefer to get the raw XML from the
response.
How can I do that ?
Thanks in advance,
yk
This is the interesting part of the WSDL :
<s:element name="SubmitXmlResponse">
<s:complexType>
<s:sequence>
<s:element maxOccurs="1" minOccurs="0" name="SubmitXmlResult">
<s:complexType>
<s:sequence>
<s:any/>
</s:sequence>
</s:complexType>
</s:element>
</s:sequence>
</s:complexType>
</s:element>
The interesting part of the generated defaultDriver.rb :
Methods = [
[ "http://webservices.galileo.com/SubmitXml",
"submitXml",
[ ["in", "parameters", ["::SOAP::SOAPElement",
"http://webservices.galileo.com", "SubmitXml"], true],
["out", "parameters", ["::SOAP::SOAPElement",
"http://webservices.galileo.com", "SubmitXmlResponse"], true] ],
{ :request_style => :document, :request_use => :literal,
:response_style => :document, :response_use => :literal }
],
And this is the interesting part of the generated default.rb :
class SubmitXmlResponse
@@schema_type = "SubmitXmlResponse"
@@schema_ns = "http://webservices.galileo.com"
@@schema_qualified = "true"
@@schema_element = [["submitXmlResult", ["SOAP::SOAPString",
XSD::QName.new("http://webservices.galileo.com", "SubmitXmlResult")]]]
def SubmitXmlResult
@submitXmlResult
end
def SubmitXmlResult=(value)
@submitXmlResult = value
end
def initialize(submitXmlResult = nil)
@submitXmlResult = submitXmlResult
end