| Author |
Failed to serialize class
|
Gandhi Ankit
Greenhorn
Joined: Sep 24, 2008
Posts: 2
|
|
Hi, I am using Weblogic8.1 to deploy my webservice. I am using servicegen and clientgen task of ant. I am implementing Dynamic Proxy client to invoke my webservice. While invoking webservice, i am passing array of my POJO class as an input parameter and getting below error message - [java] java.lang.reflect.UndeclaredThrowableException [java] at $Proxy0.lookup(Unknown Source) [java] at cititru.scan.transScan.createGiService(transScan.java:64) [java] at cititru.scan.transScan.main(transScan.java:26) [java] Caused by: java.rmi.RemoteException: Failed to invoke; nested except ion is: [java] javax.xml.rpc.JAXRPCException: web service invoke failed: javax. xml.soap.SOAPException: failed to serialize class [Lcititru.api.interdict.gi.Sc annedTextData;weblogic.xml.schema.binding.SerializationException: mapping lookup failure. class=class [Lcititru.api.interdict.gi.ScannedTextData; class context= TypedClassContext{schemaType=['java:cititru.api.interdict.gi']:ArrayOfScannedTex tData} [java] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [java] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeC onstructorAccessorImpl.java:39) [java] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Del egatingConstructorAccessorImpl.java:27) [java] at java.lang.reflect.Constructor.newInstance(Constructor.java:27 4) [java] at weblogic.webservice.core.rpc.StubImpl.throwRemoteException(St ubImpl.java:266) [java] at weblogic.webservice.core.rpc.StubImpl.invoke(StubImpl.java:25 1) Can anyone tell me what needs to be done to resolve the above error. I am also pasting my Dynamic Client code snipet below - =========================================================================== String wsdlURL = "http://localhost:7001/ws_gi_server/GiService?WSDL"; String namespace = "http://www.bea.com/ws_gi_server"; String serviceName = "GiService"; String portName = "GiServicePort"; ServiceFactory serviceFactory = ServiceFactory.newInstance(); QName service_Name = new QName(namespace, serviceName); Service sampleService = serviceFactory.createService(new URL(wsdlURL), service_Name); TypeMappingRegistry tmr = sampleService.getTypeMappingRegistry(); TypeMapping tm = (TypeMapping)tmr.createTypeMapping(); tm.register(ScannedTextData.class, service_Name, new ScannedTextDataCodec(), new ScannedTextDataCodec()); /* Service access */ GiServerInterface gi = (GiServerInterface) sampleService.getPort(new QName(namespace, portName), GiServerInterface.class); /* Service invocation */ bluReplyData = gi.lookup("MUMBAI",ruleSet,"EXECUTOR1",std); =========================================================================== Regards, Ankit [ September 24, 2008: Message edited by: Gandhi Ankit ]
|
 |
Vinod K Singh
Ranch Hand
Joined: Sep 30, 2008
Posts: 198
|
|
|
Does your POJO implements Serializable?
|
My Blog
|
 |
Gandhi Ankit
Greenhorn
Joined: Sep 24, 2008
Posts: 2
|
|
Hi Vinod, My POJO class doesn't implement the Serializable. But my build script is generating Seriliazable class for my POJO class automatically by setting 'generateType=true' attribute of the 'service' ant task. The same approach working fine with the Static client but not working with Dynamic Proxy client. Can you guide me why is it ? Regards, Ankit
|
 |
 |
|
|
subject: Failed to serialize class
|
|
|