I am fairly new to SOAP and I am stumped on a deserializer problem.
The SOAP server is using SOAP::Lite for Perl (0.52).
When I run a perl client using SOAP::Lite everything works fine.
But when I tried to implement a client with Apache SOAP for Java (2.2) the code only works when the Response has one 'value', which turns out to be an application error message. When the Response message has more than one piece of data the 'value' is 'null'. I receive no exceptions of faults in either case.
So how can I deserialize both response types and extract the results. TIA.
Gary K. Nitzberg.
EXTRACTION OF DESERIALIZED 'value'
Response resp;
Parameter ret = resp.getReturnValue();
Object value = ret.getValue();
ATTEMPT TO DESERIALIZE
StringDeserializer sd = new StringDeserializer();
smr.mapTypes(Constants.NS_URI_SOAP_ENC,
new QName("http://xml.apache.org/xml-soap", "SOAPStruct"),
SOAPStruct.class, null, sd);
SINGLE VALUE IN RESPONSE
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:namesp10="http://xml.apache.org/xml-soap"
xmlns:SOAP ENC="http://schemas.xmlsoap.org/soap/encoding/"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/1999/XMLSchema">
<SOAP-ENV:Body>
<namesp23:la_methodResponse xmlns:namesp23="http://www.domain.com/InfoData">
<s-gensym75 xsi:type="xsd:string">Error Message</s-gensym75>
</namesp23:la_methodResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
MULTIPLE VALUES IN RESPONSE
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:namesp10="http://xml.apache.org/xml-soap"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/1999/XMLSchema">
<SOAP-ENV:Body>
<namesp9:la_methodResponse xmlns:namesp9="http://www.domain.com/InfoData">
<s-gensym27 xsi:type="namesp10:SOAPStruct">
<date xsi:type="xsd:string">The Date</date>
<time xsi:type="xsd:string">The Time</time>
<mfr xsi:null="1"/>
</s-gensym27>
</namesp9:la_methodResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
