Looking through the 2.2 source, it appears that RPCMessage::unmarshal works out the correct encodingStyle URL, but then passes the wrong version to the call constructor. This doesn't trip up the Apache client because RPCRouter::invoke will pull the encodingStyle from the first child of the body if RPCMessage::encodingStyle returns null.
I've attached the diff. Cheers Simon www.pocketsoap.com On Sat, 01 Dec 2001 11:51:40 -0800, in soap you wrote: >I'm trying to call the Apache SOAP 2.2 sample >AddressBook::getAllListings, which is a literal XML request/response. >The Apache based client works, the equivalent pocketSOAP code produces >an error, i can't see why, > >Here's the Apache generated request that works > ><?xml version='1.0' encoding='UTF-8'?> ><SOAP-ENV:Envelope >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> ><ns1:getAllListings xmlns:ns1="urn:AddressFetcher" >SOAP-ENV:encodingStyle="http://xml.apache.org/xml-soap/literalxml"> ></ns1:getAllListings> ></SOAP-ENV:Body> ></SOAP-ENV:Envelope> > >Here's the pocketSOAP generated request that fails ><S:Envelope > S:encodingStyle='http://xml.apache.org/xml-soap/literalxml' > xmlns:S='http://schemas.xmlsoap.org/soap/envelope/' > xmlns:E='http://schemas.xmlsoap.org/soap/encoding/' > xmlns:a='urn:AddressFetcher'> ><S:Body><a:getAllListings></a:getAllListings> ></S:Body></S:Envelope> > >AFAIKS, this is syntactically identical, yet generates this error > ><?xml version='1.0' encoding='UTF-8'?> ><SOAP-ENV:Envelope >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> ><SOAP-ENV:Fault> ><faultcode>SOAP-ENV:Server</faultcode> ><faultstring>java.lang.IllegalArgumentException: No Serializer found >to serialize a 'org.w3c.dom.Element' using encoding style >'http://schemas.xmlsoap.org/soap/encoding/'.</faultstring> ><faultactor>/soap/servlet/rpcrouter</faultactor> ><detail> ><stackTrace>[SOAPException: faultCode=SOAP-ENV:Server; >msg=java.lang.IllegalArgumentException: No Serializer found to >serialize a 'org.w3c.dom.Element' using encoding style >'http://schemas.xmlsoap.org/soap/encoding/'.] > at >org.apache.soap.providers.RPCJavaProvider.invoke(RPCJavaProvider.java:138) > at >org.apache.soap.server.http.RPCRouterServlet.doPost(RPCRouterServlet.java:287) >[snipped rest of strack trace] ></stackTrace> ></detail> ></SOAP-ENV:Fault> ></SOAP-ENV:Body> ></SOAP-ENV:Envelope> > > >Any Ideas ? >Tx >Simon >www.pocketsoap.com
rpcmessage.diff
Description: Binary data