axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wesley Mesquita" <wesleymesqu...@gmail.com>
Subject Re: Nested return types from POJO web service method -shouldn't this work?
Date Fri, 29 Feb 2008 00:43:22 GMT
I am having the same problem here, I tried to follow the documentation at
axis2 site but I didn´t help me. Is there any old thread in this list
discussing this problem? Or some other examples that show how to do this?

Thanks.


On Thu, Feb 28, 2008 at 7:48 PM, Kraus, David <dkraus@microstrategy.com>
wrote:

>  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:* 'axis-user@ws.apache.org'
> *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
>
>
>



-- 
Wesley Mesquita
LIS/IC - UNICAMP
[skype: wesley.mesquita]

Mime
View raw message