Hi all,
I am having problems with deserializing beans. Below is the SOAP request sent by the Web Service client, as you can see the ArgumentSet class is serialized ok. However I get an Axis Fault when running the client as follows:
org.xml.sax.SAXException: Deserializing parameter 'arg1': could not find deserializer for type {urn:BeanService}ArgumentSet
This baffles me as the SOAP request ( sniffed with TCPMON ) shows the ArgumentSet was serialized accurately:
POST
/axis/services/PAFLookUp HTTP/1.0
Content-Type: text/xml;
charset=utf-8
Accept: application/soap+xml, application/dime,
multipart/related, text/*
User-Agent:
Axis/1.0
Host: localhost
Cache-Control:
no-cache
Pragma: no-cache
SOAPAction:
""
Content-Length: 1209
<?xml version="1.0"
encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<ns1:getReturn soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns1="PAFLookUp">
<arg1 href="#id0"/>
</ns1:getReturn>
<multiRef id="id0" soapenc:root="0"
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="ns2:ArgumentSet" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns2="urn:BeanService">
<arguments
href="#id1"/>
<identifier
xsi:type="xsd:string">lookupPostCode</identifier>
</multiRef>
<multiRef id="id1" soapenc:root="0"
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="ns3:Map" xmlns:ns3="http://xml.apache.org/xml-soap"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
<item>
<key
xsi:type="xsd:string">postcode</key>
<value
xsi:type="xsd:string">LS176PJ</value>
</item>
<item>
<key
xsi:type="xsd:string">addressLine1</key>
<value xsi:type="xsd:string">2</value>
</item>
</multiRef>
</soapenv:Body>
</soapenv:Envelope>
The pertinent bit of client code is:
QName
qn = new QName( "urn:BeanService", "ArgumentSet"
);
call.registerTypeMapping(ArgumentSet.class,
qn,
new org.apache.axis.encoding.ser.BeanSerializerFactory(ArgumentSet.class,
qn),
new org.apache.axis.encoding.ser.BeanDeserializerFactory(ArgumentSet.class,
qn));
//some more code
call.addParameter( "arg1", qn, ParameterMode.IN
);
call.setReturnType( qn );
I would be very grateful if someone can tell me how to use the Axis BeanDeserializerFactory to deserialize a bean type object
Many thanks in advance
Russell
Russell
Brown
Application Developer
Freeserve.com Plc
The Malthouse, Chadwick
Street, Leeds LS10 1LJ
Telephone: 0113 222 9110
