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

Ticket #332 (closed enhancement: fixed)

Opened 1 year ago

Last modified 1 year ago

CDATA in response

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

Description

from soap4r-ml:

Also, the value returned is an SOAP::Mapping::Object, which appears to
be mising some information.  This is the actual soap response:

<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>
  <env:Body>
    <gno:getHealthSummaryResponse
      xmlns:gno='http://some.url'>
      <gno:htmlContent>
        <![CDATA[<span>some html</span>]]>
      </gno:htmlContent>
    </gno:getHealthSummaryResponse>
  </env:Body>
</env:Envelope>

And the "p results;" line outputs:

#<SOAP::Mapping::Object:0x..fdbf31b4a {http://gnosis.ibm.com/
report}htmlContent=#<SOAP::Mapping::Object:0x..fdbf319ec>>

So i can get the htmlContent using:

htmlContent = results[XSD::QName.new('http://
some.url','htmlContent')];

But the CDATA information is not there, or i just cannot figure out
how to get at it.  I have tried using the wsdl to generate code, and
inserting my hack to get the namespace prefixed attribute, but the
response is still missing the CDATA:

#<GetHealthSummaryResponse:0xb7ea7c18 @htmlContent=nil>

Any help would be greatly appreciated.  I have been digging around in
the source for some time and am unable to track the flow of a request
using this API.

Change History

05/16/07 11:39:55 changed by nahi

  • priority changed from normal to high.
  • milestone changed from undefined to 1.5.6.

05/17/07 11:22:29 changed by nahi

  • priority changed from high to normal.
  • type changed from defect to enhancement.
  • milestone changed from 1.5.6 to undefined.

for now, please use Driver#return_response_as_xml instead. see [1780] for example.

05/19/07 11:57:18 changed by nahi

  • milestone changed from undefined to 1.5.6.

05/19/07 12:47:47 changed by nahi

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

(In [1784]) * added CDATA support with rexml/xmlscan as an XML parser. closes #332.

07/04/07 07:18:55 changed by user

This seems to work just fine outside of Rails, but when I install soap4r Gem and try to use it in Rails - the CDATA payload doesn't get processed correctly (same as above).

Versions:

Rails: 1.2.3 Ruby: 1.8.5

Any help? -- Thanks.