You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@xml.apache.org by ha...@alberg.stph.net on 2000/12/14 10:53:12 UTC
Re: Serialize (Mathias)
hello Mathias,
i did the same whic you told but it is giving the same problem, in fact i
was trying the same, i am getting the problem not only for the Image for
any class it is the same problem,
please giveme a solution
Hari Kishan Babu Charagundla
Mathias
Laguérie To: soap-user@xml.apache.org
<mlagueri@sof cc:
team.fr> Subject: Re: Serialize
03/14/01
03:06 PM
Please
respond to
soap-user
I have been using Apache SOAP for few days, so I'm not sure that my answer
will be interesting.
I had the similary problem with deserializer and serializer.
I resolved this problem when I did this step.
In deployementDescriptor file, you must put a map tag as follow :
<isd:mappings>
<isd:map encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:x="urn:xml-soap-address-demo" qname="x:objtest"
javaType="samples.clientserver.ObjTest"
java2XMLClassName
="org.apache.soap.encoding.soapenc.BeanSerializer"
xml2JavaClassName
="org.apache.soap.encoding.soapenc.BeanSerializer"/>
</isd:mappings>
when you do that, you tell to the SOAP Server what class it can use to
serialize the object samples.clientserver.ObjTest. (you must change
samples.clientserver.ObjTest by your image class name)
After that, your client must have means to deserialize your ObjTest. to do
that you can write in your client this lines :
String encodingStyleURI = "http://schemas.xmlsoap.org/soap/encoding/";
URL url = new URL("http://omo:8080/soap/servlet/rpcrouter");
SOAPMappingRegistry smr = new SOAPMappingRegistry();
BeanSerializer beanSer = new BeanSerializer();
smr.mapTypes(Constants.NS_URI_SOAP_ENC,
new QName("urn:xml-soap-address-demo", "objtest"),
ObjTest.class, beanSer, beanSer);
Call call = new Call();
call.setSOAPMappingRegistry(smr);
call.setTargetObjectURI("urn:ClientServer");
call.setMethodName("getObjTest");
call.setEncodingStyleURI(encodingStyleURI);
Response resp;
try
{
resp = call.invoke(url, "");
}
catch (SOAPException e)
{
System.err.println("Caught SOAPException (" +
e.getFaultCode() + "): " +
e.getMessage());
return;
}
Mathias
harikishan@alberg.stph.net a écrit :
hello,
this is hari kishan babu, i am using apache.soap, when i am trying to
send
any Image Object from Server to the Client i am get some error, it
says
that proper serializer and Deserializer are not there, can anybody
please
tell me where can i get these Serialize and Deserialize Classess, i
need
them badly, please give me the reply soon.
thanks in advance
Hari Kishan Babu Charagundla