You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@xml.apache.org by Phil Miller <ph...@skabenga.com> on 2002/08/12 22:00:32 UTC
Help with 'No Deserializer found to deserialize..'
Hi, please could someone give me an idea on how I can deserialize a Javabean
from a SOAP response, I'm going mad from trying!
I have some sample code that transmits an Address Javabean to a web service,
and expects a Javabean back. The webservice is performing the service
correctly, and sends back the SOAP response below.
The error I'm getting when I do call.invoke() is..
[SOAPException: faultCode=SOAP-ENV:Client; msg=No Deserializer found to
deserialize a ':addressIXml' using encoding style
'http://schemas.xmlsoap.org/soap/encoding/'.
As far as I can tell, I've added an 'addressIXml' mapping to the
SOAPMappingRegistry for this call.
Any ideas?
Cheers, thanks for yout time,
Phil Miller
******** SOAP response ***************************
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi_2001="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsi_2000_11="http://www.w3.org/2000/11/XMLSchema-instance"
xmlns:xsi_1999="http://www.w3.org/1999/XMLSchema-instance"
xmlns:xsd_2001="http://www.w3.org/2001/XMLSchema"
xmlns:xsd_2000_11="http://www.w3.org/2000/11/XMLSchema"
xmlns:xsd_1999="http://www.w3.org/1999/XMLSchema">
<SOAP-ENV:Body>
<model:AddAddressResponse xmlns:model="some:uri">
<addressIXml>
<m0:Line1 xmlns:m0="some:uri/Address.xsd">String</m0:Line1>
<m0:Line2 xmlns:m0="some:uri/Address.xsd">String</m0:Line2>
</addressIXml>
</model:AddAddressResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
********** Sample Code ********************************
public static Address doSOAP () throws Exception {
SOAPMappingRegistry smr = new SOAPMappingRegistry();
BeanSerializer beanSer = new BeanSerializer();
//an address
Address address = new Address();
address.setLine1("1");
address.setLine2("2");
Call call = new Call();
// use standard SOAP encoding
call.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);
// Map types
smr.mapTypes(Constants.NS_URI_SOAP_ENC,
new QName("some:uri/Address.xsd", "addressIXml"),
Address.class, beanSer, beanSer);
call.setSOAPMappingRegistry(smr);
// Set service locator parameters
call.setTargetObjectURI ("some:uri");
call.setMethodName ("AddAddress");
// Create input parameter vector
Vector params = new Vector();
params.addElement (new Parameter("addressIXml", Address.class, address,
null));
call.setParams (params);
// Invoke service
URL url= new URL("address");
Response resp = call.invoke (url,""); // exception thrown here, but SOAP
response is sent back
// evaluate response
if (resp.generatedFault ()) {
throw new Exception(resp.getFault().getFaultString());
} else {
Parameter returnParam = resp.getReturnValue();
Address result = (Address) returnParam.getValue();
return result;
--
To unsubscribe, e-mail: <ma...@xml.apache.org>
For additional commands, e-mail: <ma...@xml.apache.org>
SOAP 2.3 in WebSphere 3.5
Posted by Adrian Noriega <an...@aduanet.gob.pe>.
Hello:
I am trying to deploy a service jdom with apache soap 2.3 in WebSphere 3.5 .
The error I'm getting when I do
C:\ws\java>java org.apache.soap.server.ServiceManagerClient
http://www.desweb.com/servlet/rpcrouter deploy DeploymentConsul2.xml
Exception in thread "main" [SOAPException: faultCode=SOAP-ENV:Client;
msg=Parsin
g error, response was:
Se esperaba "</init>" para cerrar el elemento que empieza en la lÝnea 6.;
target
Exception=org.xml.sax.SAXParseException: Se esperaba "</init>" para cerrar
el el
emento que empieza en la lÝnea 6.]
at org.apache.soap.rpc.Call.invoke(Call.java:250)
at
org.apache.soap.server.ServiceManagerClient.invokeMethod(ServiceManag
erClient.java:129)
at
org.apache.soap.server.ServiceManagerClient.deploy(ServiceManagerClie
nt.java:142)
at
org.apache.soap.server.ServiceManagerClient.main(ServiceManagerClient
.java:230)
Xml call:
<?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:list xmlns:ns1="urn:xml-soap-service-management-service"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
</ns1:list>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Xml response:
<?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/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>SOAP-ENV:Server.Exception:</faultcode>
<faultstring>org.apache.xerces.dom.NodeImpl: method
<init>(Lorg/apache/xerces/dom/DocumentImpl;)V not found</faultstring>
<faultactor>/servlet/rpcrouter</faultactor>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Thanks in advance.
Adrian
--
To unsubscribe, e-mail: <ma...@xml.apache.org>
For additional commands, e-mail: <ma...@xml.apache.org>
SOAP 2.3 in WebSphere 3.5
Posted by Adrian Noriega <an...@aduanet.gob.pe>.
Hello:
I am trying to deploy a service jdom with apache soap 2.3 in WebSphere 3.5 .
The error I'm getting when I do
C:\ws\java>java org.apache.soap.server.ServiceManagerClient
http://www.desweb.com/servlet/rpcrouter deploy DeploymentConsul2.xml
Exception in thread "main" [SOAPException: faultCode=SOAP-ENV:Client;
msg=Parsin
g error, response was:
Se esperaba "</init>" para cerrar el elemento que empieza en la lÝnea 6.;
target
Exception=org.xml.sax.SAXParseException: Se esperaba "</init>" para cerrar
el el
emento que empieza en la lÝnea 6.]
at org.apache.soap.rpc.Call.invoke(Call.java:250)
at
org.apache.soap.server.ServiceManagerClient.invokeMethod(ServiceManag
erClient.java:129)
at
org.apache.soap.server.ServiceManagerClient.deploy(ServiceManagerClie
nt.java:142)
at
org.apache.soap.server.ServiceManagerClient.main(ServiceManagerClient
.java:230)
Xml call:
<?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:list xmlns:ns1="urn:xml-soap-service-management-service"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
</ns1:list>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Xml response:
<?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/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>SOAP-ENV:Server.Exception:</faultcode>
<faultstring>org.apache.xerces.dom.NodeImpl: method
<init>(Lorg/apache/xerces/dom/DocumentImpl;)V not found</faultstring>
<faultactor>/servlet/rpcrouter</faultactor>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Thanks in advance.
Adrian