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 Tanmay Kumar <ta...@isd.nec.co.jp> on 2002/10/09 07:04:20 UTC
BeanSerializer not found..
Hi all,
I am facing problem while passing a user defined object as one of the
parameters to webservice method.
I know the parameters passed to QName object creation should exactly match
with the DD entry.
So I have edited my DD like this.
<isd:mappings>
<isd:map encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:x="urn:xml-test" qname="x:newbean"
javaType="NewBean"
java2XMLClassName="org.apache.soap.encoding.soapenc.BeanSerializer"
xml2JavaClassName="org.apache.soap.encoding.soapenc.BeanSerializer"/>
</isd:mappings>
</isd:service>
And in my client program, I have done like this
smr.mapTypes(Constants.NS_URI_SOAP_ENC,
new QName("urn:xml-test", "newbean"),
NewBean.class, beanSer, beanSer);
Please help on this. Exception is below
Tans
Exception says:
java.lang.IllegalArgumentException: No Serializer found to serialize a
'NewBean' using encoding style 'h
ttp://schemas.xmlsoap.org/soap/encoding/'.
at
org.apache.soap.util.xml.XMLJavaMappingRegistry.querySerializer(XMLJavaMappi
ngRegistry.java:1
59)
at
org.apache.soap.encoding.soapenc.ParameterSerializer.marshall(ParameterSeria
lizer.java:105)
at
org.apache.soap.rpc.RPCMessage.serializeParams(RPCMessage.java:333)
at org.apache.soap.rpc.RPCMessage.marshall(RPCMessage.java:307)
at org.apache.soap.Body.marshall(Body.java:145)
at org.apache.soap.Envelope.marshall(Envelope.java:195)
at
org.apache.soap.transport.http.SOAPHTTPConnection.send(SOAPHTTPConnection.ja
va:273)
at org.apache.soap.rpc.Call.invoke(Call.java:248)
at SOAPClient.main(SOAPClient.java:53)
Exception in thread "main" [SOAPException: faultCode=SOAP-ENV:Client; msg=No
Serializer found to seriali
ze a 'NewBean' using encoding style
'http://schemas.xmlsoap.org/soap/encoding/'.; ta
rgetException=java.lang.IllegalArgumentException: No Serializer found to
serialize a 'NewBean' using enc
oding style 'http://schemas.xmlsoap.org/soap/encoding/'.]
at
org.apache.soap.transport.http.SOAPHTTPConnection.send(SOAPHTTPConnection.ja
va:355)
at org.apache.soap.rpc.Call.invoke(Call.java:248)
at SOAPClient.main(SOAPClient.java:53)
Re: BeanSerializer not found..
Posted by Tanmay Kumar <ta...@isd.nec.co.jp>.
Hi all,
I found the mistake being done by me.
I was not having this statement in my client program
call.setSOAPMappingRegistry(smr);
Now it is working fine.
Thanks,
Tans
----- Original Message -----
From: "Tanmay Kumar" <ta...@isd.nec.co.jp>
To: <so...@xml.apache.org>
Sent: Wednesday, October 09, 2002 2:04 PM
Subject: BeanSerializer not found..
> Hi all,
>
> I am facing problem while passing a user defined object as one of the
> parameters to webservice method.
> I know the parameters passed to QName object creation should exactly match
> with the DD entry.
>
> So I have edited my DD like this.
>
> <isd:mappings>
> <isd:map encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> xmlns:x="urn:xml-test" qname="x:newbean"
> javaType="NewBean"
>
> java2XMLClassName="org.apache.soap.encoding.soapenc.BeanSerializer"
>
> xml2JavaClassName="org.apache.soap.encoding.soapenc.BeanSerializer"/>
> </isd:mappings>
> </isd:service>
>
> And in my client program, I have done like this
>
> smr.mapTypes(Constants.NS_URI_SOAP_ENC,
> new QName("urn:xml-test", "newbean"),
> NewBean.class, beanSer, beanSer);
>
> Please help on this. Exception is below
> Tans
>
>
> Exception says:
>
> java.lang.IllegalArgumentException: No Serializer found to serialize a
> 'NewBean' using encoding style 'h
> ttp://schemas.xmlsoap.org/soap/encoding/'.
> at
>
org.apache.soap.util.xml.XMLJavaMappingRegistry.querySerializer(XMLJavaMappi
> ngRegistry.java:1
> 59)
> at
>
org.apache.soap.encoding.soapenc.ParameterSerializer.marshall(ParameterSeria
> lizer.java:105)
> at
> org.apache.soap.rpc.RPCMessage.serializeParams(RPCMessage.java:333)
> at org.apache.soap.rpc.RPCMessage.marshall(RPCMessage.java:307)
> at org.apache.soap.Body.marshall(Body.java:145)
> at org.apache.soap.Envelope.marshall(Envelope.java:195)
> at
>
org.apache.soap.transport.http.SOAPHTTPConnection.send(SOAPHTTPConnection.ja
> va:273)
> at org.apache.soap.rpc.Call.invoke(Call.java:248)
> at SOAPClient.main(SOAPClient.java:53)
> Exception in thread "main" [SOAPException: faultCode=SOAP-ENV:Client;
msg=No
> Serializer found to seriali
> ze a 'NewBean' using encoding style
> 'http://schemas.xmlsoap.org/soap/encoding/'.; ta
> rgetException=java.lang.IllegalArgumentException: No Serializer found to
> serialize a 'NewBean' using enc
> oding style 'http://schemas.xmlsoap.org/soap/encoding/'.]
> at
>
org.apache.soap.transport.http.SOAPHTTPConnection.send(SOAPHTTPConnection.ja
> va:355)
> at org.apache.soap.rpc.Call.invoke(Call.java:248)
> at SOAPClient.main(SOAPClient.java:53)
>
>
>
>
> --
> To unsubscribe, e-mail: <ma...@xml.apache.org>
> For additional commands, e-mail: <ma...@xml.apache.org>
>
>
--
To unsubscribe, e-mail: <ma...@xml.apache.org>
For additional commands, e-mail: <ma...@xml.apache.org>
Re: BeanSerializer not found..
Posted by Tanmay Kumar <ta...@isd.nec.co.jp>.
Hi all,
I found the mistake being done by me.
I was not having this statement in my client program
call.setSOAPMappingRegistry(smr);
Now it is working fine.
Thanks,
Tans
----- Original Message -----
From: "Tanmay Kumar" <ta...@isd.nec.co.jp>
To: <so...@xml.apache.org>
Sent: Wednesday, October 09, 2002 2:04 PM
Subject: BeanSerializer not found..
> Hi all,
>
> I am facing problem while passing a user defined object as one of the
> parameters to webservice method.
> I know the parameters passed to QName object creation should exactly match
> with the DD entry.
>
> So I have edited my DD like this.
>
> <isd:mappings>
> <isd:map encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> xmlns:x="urn:xml-test" qname="x:newbean"
> javaType="NewBean"
>
> java2XMLClassName="org.apache.soap.encoding.soapenc.BeanSerializer"
>
> xml2JavaClassName="org.apache.soap.encoding.soapenc.BeanSerializer"/>
> </isd:mappings>
> </isd:service>
>
> And in my client program, I have done like this
>
> smr.mapTypes(Constants.NS_URI_SOAP_ENC,
> new QName("urn:xml-test", "newbean"),
> NewBean.class, beanSer, beanSer);
>
> Please help on this. Exception is below
> Tans
>
>
> Exception says:
>
> java.lang.IllegalArgumentException: No Serializer found to serialize a
> 'NewBean' using encoding style 'h
> ttp://schemas.xmlsoap.org/soap/encoding/'.
> at
>
org.apache.soap.util.xml.XMLJavaMappingRegistry.querySerializer(XMLJavaMappi
> ngRegistry.java:1
> 59)
> at
>
org.apache.soap.encoding.soapenc.ParameterSerializer.marshall(ParameterSeria
> lizer.java:105)
> at
> org.apache.soap.rpc.RPCMessage.serializeParams(RPCMessage.java:333)
> at org.apache.soap.rpc.RPCMessage.marshall(RPCMessage.java:307)
> at org.apache.soap.Body.marshall(Body.java:145)
> at org.apache.soap.Envelope.marshall(Envelope.java:195)
> at
>
org.apache.soap.transport.http.SOAPHTTPConnection.send(SOAPHTTPConnection.ja
> va:273)
> at org.apache.soap.rpc.Call.invoke(Call.java:248)
> at SOAPClient.main(SOAPClient.java:53)
> Exception in thread "main" [SOAPException: faultCode=SOAP-ENV:Client;
msg=No
> Serializer found to seriali
> ze a 'NewBean' using encoding style
> 'http://schemas.xmlsoap.org/soap/encoding/'.; ta
> rgetException=java.lang.IllegalArgumentException: No Serializer found to
> serialize a 'NewBean' using enc
> oding style 'http://schemas.xmlsoap.org/soap/encoding/'.]
> at
>
org.apache.soap.transport.http.SOAPHTTPConnection.send(SOAPHTTPConnection.ja
> va:355)
> at org.apache.soap.rpc.Call.invoke(Call.java:248)
> at SOAPClient.main(SOAPClient.java:53)
>
>
>
>
> --
> To unsubscribe, e-mail: <ma...@xml.apache.org>
> For additional commands, e-mail: <ma...@xml.apache.org>
>
>