You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Sagar Pidaparthi <Sa...@chordiant.com> on 2004/09/03 17:37:44 UTC
could not find deserializer on the client
Hi,
I am using axis 1.2 and get the following error message.
org.xml.sax.SAXException: Deserializing parameter
'getCommonObjectReturn': could not find deserializer for type
{urn:com.chordiant.customer.businessClasses}Customer
I went to my wsdd file and added the required objects for serialization.
I used soap monitor and I see the response coming back, with full
returned object. Do I need to do something in the client ( i.e. set the
deserializer)to avoid this problem.
How do I avoid the error?
Regards
Sagar
-----Original Message-----
From: Anne Thomas Manes [mailto:anne@manes.net]
Sent: Friday, September 03, 2004 7:19 AM
To: axis-user@ws.apache.org; mail@robertmitschke.com
Subject: RE: TypeMapping when using RPC/literal on Axis 1.1
Axis 1.1 doesn't really support RPC/literal. Keep in mind, also, that
.NET
does not (and probably will never) support RPC/literal. I suggest you
use
wrapped document/literal instead.
You should also upgrade to Axis 1.2 if you want to use literal encoding.
- Anne
-----Original Message-----
From: robert.mitschke@web.de [mailto:robert.mitschke@web.de]
Sent: Friday, September 03, 2004 3:38 AM
To: axis-user@ws.apache.org
Subject: TypeMapping when using RPC/literal on Axis 1.1
Hi,
I am using Axis 1.1 in JBoss 3.2.3 and am trying to create a Webservice
using RPC/literal encoding. As I am using a complex object, I need a
custom
serializer, which I have already created. On my client which I created
using
AXIS as well, I register the typemapping with these serializers
programmatically, where they work like a charm. The SOAP they send out
looks
like intended.
On the Server I deployed the service using the following typemapping:
<service name="FrontendTest3" provider="java:EJB" style="RPC"
use="literal">
<parameter name="beanJndiName" value="ejb/FrontendTest3"/>
<parameter name="homeInterfaceName"
value="com.roche.mellibase3.interfaces3.FrontendTest3Home"/>
<parameter name="remoteInterfaceName"
value="com.roche.mellibase3.interfaces3.FrontendTest3"/>
<parameter name="allowedMethods"
value="doSimulate, resendSimulation, deleteMellibaseId"/>
<parameter name="jndiURL" value="jnp://localhost:1099"/>
<parameter name="jndiContextClass"
value="org.jnp.interfaces.NamingContextFactory"/>
<typeMapping
xmlns:myNS="http://application.mellibase.de/MellibaseMessageTypes.xsd"
qname="myNS:mb-request"
type="java:com.roche.mellibase3.jaxb.webservice.MbRequest"
serializer="com.roche.mellibase3.jaxbserialization.GeneralJaxBSerializer
Fac
tory"
deserializer="com.roche.mellibase3.jaxbserialization.GeneralJaxBDeserial
ize
rFactory"
encodingStlye=""
/>
<typeMapping
xmlns:myNS="http://application.mellibase.de/MellibaseMessageTypes.xsd"
qname="myNS:mb-result"
type="java:com.roche.mellibase3.jaxb.webservice.MbResult"
serializer="com.roche.mellibase3.jaxbserialization.GeneralJaxBSerializ
erFactory"
deserializer="com.roche.mellibase3.jaxbserialization.GeneralJaxBDeseri
alizerFactory"
encodingStlye=""
/>
</service>
However, there Axis only instantiates the Serializer Factories, but
never
retrieves a serializer, which leads me to the conclusion that these are
not
registered for the encoding used so that AXIS does not even try to use
them.
Additionally I get the Exception:
org.xml.sax.SAXException: SimpleDeserializer encountered a child
element,
which is NOT expected, in something it was trying to deserialize.
which again looks to me like Axis is not using my serializers.
However I was unable to find out how to register the serializers for
RPC/literal.
If anyone could give me a pointer to the solution of my problem I would
be
very grateful.
Cheers Robert Mitschke
Re: could not find deserializer on the client
Posted by Chandrasegaram Jeyakumaran <jk...@opensource.lk>.
Hi,
It seems that you haven't set the deserializer for your object.
If you are using custom type you need set both the deserializer and
serailizer in the wsdd.
have a look at userguide
regards,
Jeyakumaran.C
> Hi,
>
>
> I am using axis 1.2 and get the following error message.
>
> org.xml.sax.SAXException: Deserializing parameter
> 'getCommonObjectReturn': could not find deserializer for type
> {urn:com.chordiant.customer.businessClasses}Customer
>
>
> I went to my wsdd file and added the required objects for serialization.
> I used soap monitor and I see the response coming back, with full
> returned object. Do I need to do something in the client ( i.e. set the
> deserializer)to avoid this problem.
>
> How do I avoid the error?
>
> Regards
>
> Sagar
>
> -----Original Message-----
> From: Anne Thomas Manes [mailto:anne@manes.net]
> Sent: Friday, September 03, 2004 7:19 AM
> To: axis-user@ws.apache.org; mail@robertmitschke.com
> Subject: RE: TypeMapping when using RPC/literal on Axis 1.1
>
> Axis 1.1 doesn't really support RPC/literal. Keep in mind, also, that
> .NET
> does not (and probably will never) support RPC/literal. I suggest you
> use
> wrapped document/literal instead.
>
> You should also upgrade to Axis 1.2 if you want to use literal encoding.
>
> - Anne
>
>
> -----Original Message-----
> From: robert.mitschke@web.de [mailto:robert.mitschke@web.de]
> Sent: Friday, September 03, 2004 3:38 AM
> To: axis-user@ws.apache.org
> Subject: TypeMapping when using RPC/literal on Axis 1.1
>
> Hi,
>
> I am using Axis 1.1 in JBoss 3.2.3 and am trying to create a Webservice
> using RPC/literal encoding. As I am using a complex object, I need a
> custom
> serializer, which I have already created. On my client which I created
> using
> AXIS as well, I register the typemapping with these serializers
> programmatically, where they work like a charm. The SOAP they send out
> looks
> like intended.
>
> On the Server I deployed the service using the following typemapping:
>
> <service name="FrontendTest3" provider="java:EJB" style="RPC"
> use="literal">
> <parameter name="beanJndiName" value="ejb/FrontendTest3"/>
> <parameter name="homeInterfaceName"
> value="com.roche.mellibase3.interfaces3.FrontendTest3Home"/>
> <parameter name="remoteInterfaceName"
> value="com.roche.mellibase3.interfaces3.FrontendTest3"/>
> <parameter name="allowedMethods"
> value="doSimulate, resendSimulation, deleteMellibaseId"/>
> <parameter name="jndiURL" value="jnp://localhost:1099"/>
> <parameter name="jndiContextClass"
> value="org.jnp.interfaces.NamingContextFactory"/>
>
> <typeMapping
>
> xmlns:myNS="http://application.mellibase.de/MellibaseMessageTypes.xsd"
> qname="myNS:mb-request"
> type="java:com.roche.mellibase3.jaxb.webservice.MbRequest"
>
> serializer="com.roche.mellibase3.jaxbserialization.GeneralJaxBSerializer
> Fac
> tory"
>
> deserializer="com.roche.mellibase3.jaxbserialization.GeneralJaxBDeserial
> ize
> rFactory"
> encodingStlye=""
> />
>
> <typeMapping
>
> xmlns:myNS="http://application.mellibase.de/MellibaseMessageTypes.xsd"
> qname="myNS:mb-result"
> type="java:com.roche.mellibase3.jaxb.webservice.MbResult"
>
> serializer="com.roche.mellibase3.jaxbserialization.GeneralJaxBSerializ
> erFactory"
>
> deserializer="com.roche.mellibase3.jaxbserialization.GeneralJaxBDeseri
> alizerFactory"
> encodingStlye=""
> />
> </service>
>
> However, there Axis only instantiates the Serializer Factories, but
> never
> retrieves a serializer, which leads me to the conclusion that these are
> not
> registered for the encoding used so that AXIS does not even try to use
> them.
> Additionally I get the Exception:
>
> org.xml.sax.SAXException: SimpleDeserializer encountered a child
> element,
> which is NOT expected, in something it was trying to deserialize.
>
> which again looks to me like Axis is not using my serializers.
>
> However I was unable to find out how to register the serializers for
> RPC/literal.
>
> If anyone could give me a pointer to the solution of my problem I would
> be
> very grateful.
> Cheers Robert Mitschke
>
>
>
Lanka Software Foundation
Promoting opensource in Srilanka