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 Joe Pruitt <j....@f5.com> on 2002/02/12 02:37:08 UTC

RE: Apache Bean Deserializer Problem

Looks like your parameters to QName are incorrect.  The QName constructor takes the namespace and type of the given object.  The error indicates the QName is
 
http://www.themindelectric.com/package/com.bioweb.services.dataserver/:Category' <http://www.themindelectric.com/package/com.bioweb.services.dataserver/:Category'> 
 
So that should match to the following 
 
smr.mapTypes(Constants.NS_URI_SOAP_ENC,
    new QName(" http://www.themindelectric.com/package/com.bioweb.services.dataserver/ <http://www.themindelectric.com/package/com.bioweb.services.dataserver/> ", "Category"),
    A.class, beanSer, beanSer);

The response probably looks something like this (omitting all the extra attributes for brevity).
 
<Envelope ...>
    <Body>
        <someMethodResponse ...>
            <Result
                xsi:type="ns1:Category"
                xmlns:ns1=" http://www.themindelectric.com/package/com.bioweb.services.dataserver/ <http://www.themindelectric.com/package/com.bioweb.services.dataserver/> ">
                ...
            </Result>
        </someMethodResponse>
    </Body>
</Envelope>
 
-Joe

-----Original Message-----
From: Chirdeep Sharma [mailto:chirdeep@hotmail.com]
Sent: Monday, February 11, 2002 8:09 PM
To: soap-user@xml.apache.org
Subject: Apache Bean Deserializer Problem


Hi,
 
I am trying to deserialize a complex object of the following type;
 
class A {
    Integer id;
    String str;
    B[] anObjectArray;
}
 
class B {
    Integer id;
    String str;
    C anObject;
}
 
class C {
    Integer id;
    String str;
}
 
I created the java bean classes for these objects with setters/getters and no arg constructor. The Object returned from the soap call is A as the name "Result". I mapped all the classes as follows..
 
 smr.mapTypes(Constants.NS_URI_SOAP_ENC,
              new QName("urn:theurn", "Result"),
             A.class, beanSer, beanSer);

 
 smr.mapTypes(Constants.NS_URI_SOAP_ENC,
              new QName("urn:theurn", "Result"),
             B.class, beanSer, beanSer);
 
 smr.mapTypes(Constants.NS_URI_SOAP_ENC,
              new QName("urn:theurn", "Result"),
             C.class, beanSer, beanSer);
 
But on the Call.invoke I am getting the following exception where Category corresponds to the Object A:
Caught SOAPException (SOAP-ENV:Client): No Deserializer found to deserialize a '
http://www.themindelectric.com/package/com.bioweb.services.dataserver/:Category' <http://www.themindelectric.com/package/com.bioweb.services.dataserver/:Category'> 
 using encoding style 'http://schemas.xmlsoap.org/soap/encoding/'.
 
Can somebody help me with this..
Thanks..
Chirdeep.