So the question is:
In order to support a complex nested object as a return type, using the POJO mechanism, is it necessary to also generate the server-side serialization code (adb databinding)? ________________________________ From: Kraus, David Sent: Thursday, February 28, 2008 11:18 AM To: '[email protected]' Subject: Nested return types from POJO web service method -shouldn't this work? I have defined a POJO service which has a method which returns an object which contains fields that are nested non-simple objects. So given the Pojo class which implements ReturnInfoObject, the InfoObj object being returned contains a field nest which is defined by the NestedObj object. public class Pojo { public InfoObj ReturnInfoObject() { ... } } public class InfoObj { private java.lang.String val; private NestedObj nest; } public class NestedObj { private java.lang.String nestedVal; } When my client calls the deployed Pojo service, the val field of InfoObj shows up in the soap trace, but the nest field is empty, even when it has been correctly allocated on the service side. It appears that the service side does not know how to serialize the nested object. In the past, I have used nested objects like this fine, when defining non-POJO services, by using wsdl2java to generate the service-side serialization code. It was my understanding that I wouldn't have to generate this service-side serialization code, when using the POJO approach. Was my assumption incorrect? Am I missing something? My POJO approach was basically to compile the Pojo class and all its supporting classes, build an aar file and place it in the Axis2 services directory. This seems to work, except the return object's nested fields are not being serialized by the service. Thanks, Dave
