Hi!
I have a Problem understanding the deserialisation of SOAP-Responses.
The "normal" way, calling a XML WebService is to use WSDL
1) Send Request
2) Get SOAP-Response
3) With Informations out of WSDL transform the SOAP-Response to an Object.
Let us call it "Customer".
So far, so good. But in my Szenario, I have no WSDL. The Responses of the
Services I'm talking with are high dynamical, e.g. sometimes a Customer ist
returned, the next Time an Invoice.
My purpose now is to deserialize the SOAP-Response on my own.
I.e. if the SOAP-Response carries two integeres and one string, then I want
that the SOAPCaller to return a Hashtable with the name of the Attributes
and their values in the according type.
Let's look on this simple SOAP-Response
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
SOAP-ENV:encodingSty le="http://schemas.xmlsoap .org/soap/encoding/"
xmlns:SOAP-ENC="http://schemas.xmlsoap .org/soap/encoding/"
xmlns:xsi="http ://www.w3.org/1999/XMLSchema-instance"
xmlns:SOAP-ENV="http://schemas.xmlsoap .org/soap/envelope/"
xmlns:xsd3="htt p://www.w3.org/2001/XMLSchema"
xmlns:xsd="http ://www.w3.org/1999/XMLSchema">
<SOAP-ENV:Body>
<ns1:getIdentDa taByIdResponse xmlns:ns1="http ://xxxxx/userdaten"
SOAP-ENC:root="1">
<IdentData>
<tel xsi:null="1"/>
<last_logon xsi:type="xsd3: dateTime">2004-05-06T11:01:30Z</last_logon>
<lastname xsi:type="xsd:s tring">Test</nachname>
<firstname xsi:type="xsd:s tring">CAT</vorname>
<use_external_e mail xsi:type="xsd:i nteger">0</use_external_em ail>
</IdentData>
</ns1:getIdentDat aByIdResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Out of this I want to create a Hashtable with
tel: null (object)
last_logon: 2004-05-06T11:01:30Z (DateTime)
lastname: Test (string)
firstname: CAT (string)
use_external_em ail: 0 (integer)
Is there some way to do this, without implementing all SOAP-Types on my own.
In the easiest way I would wish to have an Attribute in the class
SOAPResponse called "Value" of type Object.
Thank you very much,
Christian
I have a Problem understanding the deserialisation of SOAP-Responses.
The "normal" way, calling a XML WebService is to use WSDL
1) Send Request
2) Get SOAP-Response
3) With Informations out of WSDL transform the SOAP-Response to an Object.
Let us call it "Customer".
So far, so good. But in my Szenario, I have no WSDL. The Responses of the
Services I'm talking with are high dynamical, e.g. sometimes a Customer ist
returned, the next Time an Invoice.
My purpose now is to deserialize the SOAP-Response on my own.
I.e. if the SOAP-Response carries two integeres and one string, then I want
that the SOAPCaller to return a Hashtable with the name of the Attributes
and their values in the according type.
Let's look on this simple SOAP-Response
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
SOAP-ENV:encodingSty le="http://schemas.xmlsoap .org/soap/encoding/"
xmlns:SOAP-ENC="http://schemas.xmlsoap .org/soap/encoding/"
xmlns:xsi="http ://www.w3.org/1999/XMLSchema-instance"
xmlns:SOAP-ENV="http://schemas.xmlsoap .org/soap/envelope/"
xmlns:xsd3="htt p://www.w3.org/2001/XMLSchema"
xmlns:xsd="http ://www.w3.org/1999/XMLSchema">
<SOAP-ENV:Body>
<ns1:getIdentDa taByIdResponse xmlns:ns1="http ://xxxxx/userdaten"
SOAP-ENC:root="1">
<IdentData>
<tel xsi:null="1"/>
<last_logon xsi:type="xsd3: dateTime">2004-05-06T11:01:30Z</last_logon>
<lastname xsi:type="xsd:s tring">Test</nachname>
<firstname xsi:type="xsd:s tring">CAT</vorname>
<use_external_e mail xsi:type="xsd:i nteger">0</use_external_em ail>
</IdentData>
</ns1:getIdentDat aByIdResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Out of this I want to create a Hashtable with
tel: null (object)
last_logon: 2004-05-06T11:01:30Z (DateTime)
lastname: Test (string)
firstname: CAT (string)
use_external_em ail: 0 (integer)
Is there some way to do this, without implementing all SOAP-Types on my own.
In the easiest way I would wish to have an Attribute in the class
SOAPResponse called "Value" of type Object.
Thank you very much,
Christian
Comment