axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rune Sindahl" ...@lpt.dk>
Subject XML character entities
Date Fri, 02 Dec 2011 15:13:35 GMT
Hi Axis2C user list

 

I have an assignment where I need to request a webservice for some data.
Unfortunately the webservice has been very poorly designed(at least I think)
by saying that all it returns is contained within a data element whose type
is a string. This means that all kinds of xml data and structures are
returned within this data element and are encoded with XML character
entities(at least that’s what mr. Google tells me). An example looks like
this:

 

<?xml version="1.0" encoding="UTF-8"?>

<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">

  <SOAP-ENV:Body>

    <tst:getData xmlns:tst="http://mytst.com/">

      <data> 

        &lt;somenumber id="123456789"&gt; 

            &lt;dateTime&gt;2011-12-01 21:21:02&lt;/dateTime&gt; 

            &lt;anotherNumber&gt;12345&lt;/anotherNumber&gt;

            &lt;expiryDate&gt;2011-12-02 13:21:02&lt;/expiryDate&gt; 

        &lt;/someNumber&gt;

      </data>

     </tst:getData>

  </SOAP-ENV:Body>

</SOAP-ENV:Envelope>

 

Do any of you know a way to decode these character entities(&lt; à ‘<’ and
&lt; à ’>’ etc.) within the axis2c framework?

Since the received structure is always the same, I would then like to create
my own wsdl file and create the autogenerated client code based on this
modified wsdl-file, so I don’t have to parse the content myself. But this
would require me to modify the server code by decoding the character
entities before the content gets parsed by the server code.

 

I appreciate any tips or help.

 

Best Regards

Rune Sindahl

 

LPT-IT APS

Stormgade 9, 1 DK-7100 Vejle

Tlf: +45 76 74 04 84

Fax: +45 76 74 04 82

Mobil: +45 29 25 73 66

 


Mime
View raw message