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 Mike Sick <mi...@usermagnet.com> on 2001/03/20 22:23:22 UTC

Apache/SOAP :: No Deserializer found to deserialize a 'urn:xml-soap-address-demo:address' issue

Hello Soapers,

I'm having a bit of trouble running the AddressBook/PutAddress example
provided with the ApacheSoap toolkit. I get a fault stating "No Deserializer
found to deserialize a 'urn:xml-soap-address-demo:address' ..." when I send
my request (full request/response below) with the parameters given in
putAddress.bat (below). I'm running JDK1.3.0_01 on Win2k and have tried
using xerces 1_0_4, 1_2_2, 1_2_3, and 1_3_0 (because I saw a June posting
with the same problem in regards to xerces versions). I configured the
service by hand and the type mappings are as follows:

[TypeMapping
encodingStyle=http://schemas.xmlsoap.org/soap/encoding/,elementType=urn:xml-
soap-address-demo:x:address,javaType=samples.addressbook.Address,java2XMLCla
ssName=org.apache.soap.encoding.soapenc.BeanSerializer,xml2JavaClassName=org
.apache.soap.encoding.soapenc.BeanSerializer]
[TypeMapping
encodingStyle=http://schemas.xmlsoap.org/soap/encoding/,elementType=urn:xml-
soap-address-demo:x:phone,javaType=samples.addressbook.PhoneNumber,java2XMLC
lassName=org.apache.soap.encoding.soapenc.BeanSerializer,xml2JavaClassName=o
rg.apache.soap.encoding.soapenc.BeanSerializer]

The client prints out:
C:\soap-exp>putAddress
Generated fault:
  Fault Code   = SOAP-ENV:Client
  Fault String = No Deserializer found to deserialize a
'urn:xml-soap-address-de
mo:address' using encoding style
'http://schemas.xmlsoap.org/soap/encoding/'.

Any help would be much appreciated. I've been looking for a simple config
error but I'm confused to why the GetAddress example would work and the
PutAddress would not. Does ApacheSoap use Xerces by default or exclusively?
or might I need to configure the server jaxp parameters to use xerces
explicitly?

Best regards,

Michael Sick


Response:

HTTP/1.0 400 Bad Request
Content-Type: text/xml; charset=UTF-8
Content-Length: 530
Set-Cookie2: JSESSIONID=jizcpr9cv1;Version=1;Discard;Path="/soap"
Set-Cookie: JSESSIONID=jizcpr9cv1;Path=/soap
Servlet-Engine: Tomcat Web Server/3.2.1 (JSP 1.1; Servlet 2.2; Java
1.3.0_01; Windows 2000 5.0 x86; java.vendor=Sun Microsystems Inc.)

<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:Client</faultcode>
<faultstring>No Deserializer found to deserialize a
'urn:xml-soap-address-demo:address' using encoding style
'http://schemas.xmlsoap.org/soap/encoding/'.</faultstring>
<faultactor>/soap/servlet/rpcrouter</faultactor>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
--------------------------------------------------------------------

Request:

POST /soap/servlet/rpcrouter HTTP/1.0
Host: localhost:8070
Content-Type: text/xml
Content-Length: 940
SOAPAction: ""

<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:addEntry xmlns:ns1="urn:AddressFetcher"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<nameToRegister xsi:type="xsd:string">John B. Good</nameToRegister>
<address xmlns:ns2="urn:xml-soap-address-demo" xsi:type="ns2:address">
<phoneNumber xsi:type="ns2:phone">
<exchange xsi:type="xsd:string">555</exchange>
<areaCode xsi:type="xsd:int">212</areaCode>
<number xsi:type="xsd:string">1212</number>
</phoneNumber>
<zip xsi:type="xsd:int">22222</zip>
<streetNum xsi:type="xsd:int">215</streetNum>
<streetName xsi:type="xsd:string">This Way</streetName>
<state xsi:type="xsd:string">State</state>
<city xsi:type="xsd:string">Cittyville</city>
</address>
</ns1:addEntry>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
--------------------------------------------------------------------

File: putAddress.bat
@echo off
set java=java

set
CLASSPATH=C:\soap-exp\membership;C:\soap-exp\soap-2_0;C:\soap-exp\xerces-1_0
_4\xerces.jar;C:\soap-exp\soap-2_0\lib\soap.jar;%CLASSPATH%

set TOMCAT_HOME=C:\soap-exp\jakarta-tomcat-3.2.1

set PATH=C:\soap-exp\jakarta-tomcat-3.2.1\bin;%PATH%
set JAVA_HOME=D:\Java\jdk1.3.0

java
samples.addressbook.PutAddress -http://schemas.xmlsoap.org/soap/encoding/
http://localhost:8070/soap/servlet/rpcrouter "John B. Good" 215 "This Way"
Cittyville State 22222 212 555 1212
--------------------------------------------------------------------

JAVA:
C:\soap-exp>java -version
java version "1.3.0_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0_01)
Java HotSpot(TM) Client VM (build 1.3.0_01, mixed mode)
--------------------------------------------------------------------

Server Output:
C:\soap-exp>service
Including all jars in C:\soap-exp\jakarta-tomcat-3.2.1\lib in your
CLASSPATH.

Using CLASSPATH:
C:\soap-exp\membership;C:\soap-exp\soap-2_0;C:\soap-exp\xerces-
1_3_0\xerces.jar;C:\soap-exp\soap-2_0\lib\soap.jar;C:\Program
Files\OpenLink2\jd
k1.2\megathin2.jar;C:\Program Files\OpenLink2\jdk1.2\opljdbc2.jar;C:\Program
Fil
es\OpenLink\jdk1.2\megathin2.jar;C:\Program
Files\OpenLink\jdk1.2\opljdbc2.jar;C
:\Program Files\openlink\jdk12\megathin2.jar;C:\Program
Files\openlink\jdk12\opl
jdbc2.jar;;C:\soap-exp\jakarta-tomcat-3.2.1\classes;C:\soap-exp\jakarta-tomc
at-3
.2.1\lib\ant.jar;C:\soap-exp\jakarta-tomcat-3.2.1\lib\jasper.jar;C:\soap-exp
\jak
arta-tomcat-3.2.1\lib\jaxp.jar;C:\soap-exp\jakarta-tomcat-3.2.1\lib\parser.j
ar;C
:\soap-exp\jakarta-tomcat-3.2.1\lib\servlet.jar;C:\soap-exp\jakarta-tomcat-3
.2.1
\lib\webserver.jar;D:\Java\jdk1.3.0\lib\tools.jar

2001-03-20 03:32:46 - ContextManager: Adding context Ctx( /examples )
2001-03-20 03:32:46 - ContextManager: Adding context Ctx( /admin )
2001-03-20 03:32:46 - ContextManager: Adding context Ctx( /soap )
Starting tomcat. Check logs/tomcat.log for error messages
2001-03-20 03:32:46 - ContextManager: Adding context Ctx(  )
2001-03-20 03:32:46 - ContextManager: Adding context Ctx( /test )
2001-03-20 03:32:47 - PoolTcpConnector: Starting HttpConnectionHandler on
8080
2001-03-20 03:32:48 - PoolTcpConnector: Starting Ajp12ConnectionHandler on
8007
>>(Tue Mar 20 15:33:05 EST 2001) Processing SOAP request...
--------------------------------------------------------------------