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 "I.V.Rajesh" <iv...@india.adventnet.com> on 2002/10/10 16:18:54 UTC
Serialization issue
Hi,
I have deployed my service in Axis engine. I have written
serializer and deserializer for the class ObjectName which is used for
invoking the method in RemoteMBeanServerImpl. This is shown below. But
when i try to invoke the method it throws SAXException.
MY wsdd file conmtains:
<service name="SoapAdaptorService" provider="java:RPC">
<parameter name="className"
value="com.adventnet.adaptors.soap.RemoteMBeanServerImpl" />
<parameter name="allowedMethods" value="*" />
<typeMapping xmlns:ns="http://soapinterop.org/xsd"
qname="ns:ObjectName"
type="java:javax.management.ObjectName"
serializer="org.apache.axis.encoding.SerializerFactory"
deserializer="org.apache.axis.encoding.DeserializerFactory"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
</service>
The Exception content :
SAXEXCEPTION: Deseralizing parameter "arg0": could not find deseralizer
for type {http://www.w3.org/2001/XMLSchema}anyType
I have given a print in my serialize file (i.e ObjectNameSer.java). But
it was not called.
Please may i know where i am going wrong?.
Thanks,
Rajesh I.V
Re: Serialization issue
Posted by Bob Cotton <bc...@synxis.com>.
>>>>> "Rajesh" == I V Rajesh <I.V.Rajesh> writes:
Rajesh> Hi Bob, Thanks for the help. The following is the content
Rajesh> in the wsdd file. ObjectNameSerFactory and
Rajesh> ObjectNameDeserFactory are the serializer and deserializer
Rajesh> factory classes for ObjectName. The serializer and
Rajesh> deserializer classes for ObjectName are
Rajesh> ObjectNameSerializer and ObjectNameDeser.
Rajesh> <service name="SoapAdaptor" provider="java:RPC">
Rajesh> <parameter name="className"
Rajesh> value="com.adventnet.adaptors.soap.RemoteMBeanServerImpl"
Rajesh> />
Rajesh> <parameter name="allowedMethods" value="*" />
Rajesh> <typeMapping xmlns:ns="http://soapinterop.org/xsd"
Rajesh> qname="ns:ObjectName"
Rajesh> type="java:javax.management.ObjectName"
Rajesh> serializer="com.adventnet.adaptors.soap.ObjectNameSerFactory"
Rajesh> deserializer="com.adventnet.adaptors.soap.ObjectNameDeserFactory"
Rajesh> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
Rajesh> />
Rajesh> </service>
Here's what we use to register a custom serializer for
java.util.Locale:
<typeMapping
xmlns:ns="http://util.java"
qname="ns:Locale"
type="java:java.util.Locale"
serializer="org.apache.axis.encoding.ser.LocaleSerializerFactory"
deserializer="org.apache.axis.encoding.ser.LocaleDeserializerFactory"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
/>
LocaleSerializerFactory and friends is something we wrote.
If you have an axis-based client, you will have to register this in
the client-config.wsdd file also. Search the archives for usages of
that.
Hope this helps
- Bob
--
SynXis Corporation | bob@synxis.com | no .sig today.
1610 Wynkoop, Suite 400 | Ph: (303)595-2511 |
Denver, CO 80202 | Fax:(303)534-4257 |
Re: Serialization issue
Posted by "I.V.Rajesh" <iv...@india.adventnet.com>.
Hi Bob,
Thanks for the help. The following is the content in the wsdd file.
ObjectNameSerFactory and ObjectNameDeserFactory are the serializer and deserializer
factory classes for ObjectName. The serializer and deserializer classes for
ObjectName are ObjectNameSerializer and ObjectNameDeser.
<service name="SoapAdaptor" provider="java:RPC">
<parameter name="className"
value="com.adventnet.adaptors.soap.RemoteMBeanServerImpl" />
<parameter name="allowedMethods" value="*" />
<typeMapping xmlns:ns="http://soapinterop.org/xsd"
qname="ns:ObjectName"
type="java:javax.management.ObjectName"
serializer="com.adventnet.adaptors.soap.ObjectNameSerFactory"
deserializer="com.adventnet.adaptors.soap.ObjectNameDeserFactory"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
</service>
In Axis examples i could not exactly find how to mention Serializer,Deserializer,
SerializerFactory and DeserializerFactory.
Please can you tell me how i can specify these in the wsdd file.
Thanks,
Rajesh I.V
Bob Cotton wrote:
> >>>>> "Rajesh" == I V Rajesh <I.V.Rajesh> writes:
>
> Rajesh> Hi,
> Rajesh> I have deployed my service in Axis engine. I have
> Rajesh> written
> Rajesh> serializer and deserializer for the class ObjectName which
> Rajesh> is used for invoking the method in RemoteMBeanServerImpl.
> Rajesh> This is shown below. But when i try to invoke the method
> Rajesh> it throws SAXException.
>
> Rajesh> MY wsdd file conmtains:
>
> Rajesh> <service name="SoapAdaptorService" provider="java:RPC">
> Rajesh> <parameter name="className"
> Rajesh> value="com.adventnet.adaptors.soap.RemoteMBeanServerImpl"
> Rajesh> />
> Rajesh> <parameter name="allowedMethods" value="*" />
> Rajesh> <typeMapping xmlns:ns="http://soapinterop.org/xsd"
> Rajesh> qname="ns:ObjectName"
> Rajesh> type="java:javax.management.ObjectName"
> Rajesh> serializer="org.apache.axis.encoding.SerializerFactory"
> Rajesh> deserializer="org.apache.axis.encoding.DeserializerFactory"
>
> In addition to writing your De/Serializer you also need to write a
> factory for that De/Serializer. Then you register your new factories
> in the wsdd.
>
> Hope this helps
>
> - Bob
>
> Rajesh> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> Rajesh> />
>
> Rajesh> </service>
>
> Rajesh> The Exception content : SAXEXCEPTION: Deseralizing
> Rajesh> parameter "arg0": could not find deseralizer for type
> Rajesh> {http://www.w3.org/2001/XMLSchema}anyType
>
> Rajesh> I have given a print in my serialize file (i.e
> Rajesh> ObjectNameSer.java). But it was not called. Please may i
> Rajesh> know where i am going wrong?.
>
> Rajesh> Thanks, Rajesh I.V
>
> --
> SynXis Corporation | bob@synxis.com | no .sig today.
> 1610 Wynkoop, Suite 400 | Ph: (303)595-2511 |
> Denver, CO 80202 | Fax:(303)534-4257 |
Re: Serialization issue
Posted by Bob Cotton <bc...@synxis.com>.
>>>>> "Rajesh" == I V Rajesh <I.V.Rajesh> writes:
Rajesh> Hi,
Rajesh> I have deployed my service in Axis engine. I have
Rajesh> written
Rajesh> serializer and deserializer for the class ObjectName which
Rajesh> is used for invoking the method in RemoteMBeanServerImpl.
Rajesh> This is shown below. But when i try to invoke the method
Rajesh> it throws SAXException.
Rajesh> MY wsdd file conmtains:
Rajesh> <service name="SoapAdaptorService" provider="java:RPC">
Rajesh> <parameter name="className"
Rajesh> value="com.adventnet.adaptors.soap.RemoteMBeanServerImpl"
Rajesh> />
Rajesh> <parameter name="allowedMethods" value="*" />
Rajesh> <typeMapping xmlns:ns="http://soapinterop.org/xsd"
Rajesh> qname="ns:ObjectName"
Rajesh> type="java:javax.management.ObjectName"
Rajesh> serializer="org.apache.axis.encoding.SerializerFactory"
Rajesh> deserializer="org.apache.axis.encoding.DeserializerFactory"
In addition to writing your De/Serializer you also need to write a
factory for that De/Serializer. Then you register your new factories
in the wsdd.
Hope this helps
- Bob
Rajesh> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
Rajesh> />
Rajesh> </service>
Rajesh> The Exception content : SAXEXCEPTION: Deseralizing
Rajesh> parameter "arg0": could not find deseralizer for type
Rajesh> {http://www.w3.org/2001/XMLSchema}anyType
Rajesh> I have given a print in my serialize file (i.e
Rajesh> ObjectNameSer.java). But it was not called. Please may i
Rajesh> know where i am going wrong?.
Rajesh> Thanks, Rajesh I.V
--
SynXis Corporation | bob@synxis.com | no .sig today.
1610 Wynkoop, Suite 400 | Ph: (303)595-2511 |
Denver, CO 80202 | Fax:(303)534-4257 |