Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
  • Mikalai Zaikin

Failed to serialize class

Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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(
[java] at cititru.scan.transScan.main(
[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 [
annedTextData;weblogic.xml.schema.binding.SerializationException: mapping lookup
failure. class=class [; class context=
[java] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
[java] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeC
[java] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Del
[java] at java.lang.reflect.Constructor.newInstance(
[java] at weblogic.webservice.core.rpc.StubImpl.throwRemoteException(St
[java] at weblogic.webservice.core.rpc.StubImpl.invoke(

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 = "";
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);

[ September 24, 2008: Message edited by: Gandhi Ankit ]
Ranch Hand
Posts: 198
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Does your POJO implements Serializable?
Gandhi Ankit
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ?


eat bricks! HA! And here's another one! And a tiny ad!
We need your help - Coderanch server fundraiser
    Bookmark Topic Watch Topic
  • New Topic