Skip to Content
Former Member
Aug 20, 2005 at 01:23 PM

Error while returning complex data type in a J2EE web service



I am implementing J2EE web service which returns array of custom class object.

I have implemented serializable interface to custom class, and also to session bean.

But it gives the following error:

Serializing object [Lcom.ltitl.j2ee.ejb.classes.ProjectDetails;@2a2289 fails. Nested message: XML Serialization Error. Object of Class [com.ltitl.j2ee.ejb.classes.ProjectDetails] does not have property [ObjId] of type [java.lang.Integer]. Check if the right object is passed to the serialization routine..

As error stated about some property ObjId..I tried including such property in my class. But now it gave exception while deploying stating that ObjId already defined.

Also I want to return multiple arrays of complex custom classes. i tried using vectors but didnt work. What is the method to return arrays of complex custom classes.

Please help..