You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@ws.apache.org by "Gu, Feng" <fg...@atxtelematics.com> on 2003/02/20 23:53:36 UTC
Help, please! No Deserializer found to deserialize
I got the following error when I send SOAP RPC request to server which
running on my local machine.
<faultcode>SOAP-ENV:Client</faultcode>
<faultstring>No Deserializer found to deserialize a
'urn:xml-soap-BMWTeleservice-demo:requestInfo' using encoding
style 'http://schemas.xmlsoap.org/soap/encoding/'.
</faultstring>
<faultactor>/soap/servlet/rpcrouter</faultactor>
The XML file which send to server is:
<?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>
<ns1:createRequestForTeleservice xmlns:ns1="urn:ServiceRft"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<requestInfo xmlns:ns2="urn:xml-soap-BMWTeleservice-demo"
xsi:type="ns2:requestInfo" type="43" retry="0">
<callingChannel xsi:type="xsd:string">491724038180</callingChannel>
<nsc xsi:type="xsd:string">US1</nsc>
<brand xsi:type="xsd:string">BMW</brand>
</requestInfo>
</ns1:createRequestForTeleservice>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
The deployment file is
<isd:service xmlns:isd="http://xml.apache.org/xml-soap/deployment"
id="urn:ServiceRft">
<isd:provider type="java"
scope="Application"
methods="createRequestForTeleservice
cancelRequestForTeleservice">
<isd:java class="com.atx.BMWConnect.BMWTestServer.BMWTeleService"
static="false"/>
</isd:provider>
<isd:faultListener>org.apache.soap.server.DOMFaultListener</isd:faultListene
r>
<isd:mappings>
<isd:map encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:x="urn://track.com/BMWConnect/" qname="x:requestInfo"
javaType="com.atx.BMWConnect.databean.RequestInfo"
java2XMLClassName="com.atx.BMWConnect.databean.RequestInfoSerializer"
xml2JavaClassName="com.atx.BMWConnect.databean.RequestInfoSerializer"/>
<isd:map encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:x="urn://track.com/BMWConnect/"
qname="x:localizationList"
javaType="com.atx.BMWConnect.databean.LocalizationList"
java2XMLClassName="com.atx.BMWConnect.databean.LocalizationListSerializer"
xml2JavaClassName="com.atx.BMWConnect.databean.LocalizationListSerializer"/>
<isd:map encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:x="urn://track.com/BMWConnect/" qname="x:chassisNumber"
javaType="com.atx.BMWConnect.databean.ChassisNumber"
java2XMLClassName="com.atx.BMWConnect.databean.ChassisNumberSerializer"
xml2JavaClassName="com.atx.BMWConnect.databean.ChassisNumberSerializer"/>
<isd:map encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:x="urn://track.com/BMWConnect/" qname="x:localization"
javaType="com.atx.BMWConnect.databean.Localization"
java2XMLClassName="com.atx.BMWConnect.databean.LocalizationSerializer"
xml2JavaClassName="com.atx.BMWConnect.databean.LocalizationSerializer"/>
<isd:map encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:x="urn://track.com/BMWConnect/" qname="x:vehicle"
javaType="com.atx.BMWConnect.databean.Vehicle"
java2XMLClassName="com.atx.BMWConnect.databean.VehicleSerializer"
xml2JavaClassName="com.atx.BMWConnect.databean.VehicleSerializer"/>
<isd:map encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:x="urn://track.com/BMWConnect/"
qname="x:additionalInformation"
javaType="com.atx.BMWConnect.databean.AdditionalInformation"
java2XMLClassName="com.atx.BMWConnect.databean.AdditionalInformationSerializ
er"
xml2JavaClassName="com.atx.BMWConnect.databean.AdditionalInformationSerializ
er"/>
<isd:map encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:x="urn://track.com/BMWConnect/"
qname="x:assistancePartner"
javaType="com.atx.BMWConnect.databean.AssistancePartner"
java2XMLClassName="com.atx.BMWConnect.databean.AssistancePartnerSerializer"
xml2JavaClassName="com.atx.BMWConnect.databean.AssistancePartnerSerializer"/
>
</isd:mappings>
</isd:service>
The java code is:
Call call = new Call();
call.setTargetObjectURI("urn:ServiceRft");
call.setEncodingStyleURI( "http://schemas.xmlsoap.org/soap/encoding/");
conn.setUserName(user);
conn.setPassword(password);
call.setSOAPTransport(conn);
call.setSOAPMappingRegistry(smr);
call.setMethodName("createRequestForTeleservice");
Vector params = new Vector();
Parameter requestInfoParam = new Parameter("requestInfo",
RequestInfo.class, requestInfo, null);
params.addElement(requestInfoParam);
I use the following code to register a java type.
SOAPMappingRegistry smr = new SOAPMappingRegistry() ;
String BMWnamespaceURI = "urn:xml-soap-BMWTeleservice-demo";
RequestInfoSerializer ser_0 = new RequestInfoSerializer();
smr.mapTypes("http://schemas.xmlsoap.org/soap/encoding/", new
QName(BMWnamespaceURI, "requestInfo"), RequestInfo.class, ser_0, ser_0);
CONFIDENTIALITY NOTICE: The information in this e-mail is privileged and
confidential. Any use, copying or dissemination of any portion of this
e-mail by or to anyone other than the intended recipient(s) is unauthorized.
If you have received this e-mail in error, please reply to sender and delete
it from your system immediately.