Welcome to the "trac"-ing site of soap4r!
[soap4r] [httpclient] [openpgp4u] [pkcs1] [logger] [csv] [vtr]

Ticket #250 (closed enhancement: fixed)

Opened 2 years ago

Last modified 2 years ago

get the raw XML from the response

Reported by: nahi Assigned to: nahi
Priority: normal Milestone: 1.5.6
Component: soap4r Version: 1.5
Keywords: Cc:

Description

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

Change History

09/09/06 10:34:15 changed by nahi

  • status changed from new to closed.
  • resolution set to fixed.

(In [1716]) added SOAP::RPC::Driver#return_response_as_xml property (boolean) for getting raw XML response. closes #250.