You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by robert lazarski <ro...@gmail.com> on 2006/08/16 18:46:12 UTC

Re: Axis2: how to use Java POJO beans

You're setting:

 client.setIdentifier("123");

But returning:

 return l_ client;

Is that what you intended to do ?

HTH,
Robert
http://www.braziloutsource.com

On 8/16/06, Charak, Vikas <vi...@cns-inc.com> wrote:
> Hi ,
>
> I have created a web service with the following two simple methods
>
> Method1:
>         public Client getClient() {
>                 // Client is a simple java class with getter and setter.
>                 Client client= new Client();
>                 client.setIdentifier("123");
>                 return l_ client;
>         }
>
>
>
> Method2:
> The second method uses java primitives
>         public String getValue(String para) {
>                 return para;
>         }
>
>
> On the client side when I invoke method method2 , I did get the value
> "para" where as invoking method1 returns nothing. Do I need to do any
> mapping on my custom class "Client" somewhere?
>
>
> Code snippet to print outpuit on client side
> ...
>
>         OMElement result = serviceClient.sendReceive(getPayload());
>         System.out.println("Result=="+ l_ result);
> ..
>
> Here is my xml output (system out) on client side for method1
> <ns:getClientResponse xmlns:ns="http://org.apache.axis2/xsd"><return
> /><return /></ns: getClientResponse >
>
> (No data "123" in this XML)
>
>
> Any help is appreciated.
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org