RE: Axis2: how to use Java POJO beans
My Mistake. My WSDL was wrong. For some reason Axis2 Eclipse plugin generates wrong WSDL (from Java code) if you have a Java Bean as input or output parameter. I have to manually modify it to deploy the service. Any one else faces such a problem? -Original Message- From: Charak, Vikas Sent: Wednesday, August 16, 2006 12:49 PM To: 'axis-user@ws.apache.org' Subject: RE: Axis2: how to use Java POJO beans Sorry here is the correct method Method1: > public Client getClient() { > // Client is a simple java class with getter and setter. > Client client= new Client(); > client.setIdentifier("123"); > return client; > } > -Original Message- From: robert lazarski [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 16, 2006 12:46 PM To: axis-user@ws.apache.org Subject: 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 <[EMAIL PROTECTED]> 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 > http://org.apache.axis2/xsd";> /> > > (No data "123" in this XML) > > > Any help is appreciated. > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Axis2: how to use Java POJO beans
Sorry here is the correct method Method1: > public Client getClient() { > // Client is a simple java class with getter and setter. > Client client= new Client(); > client.setIdentifier("123"); > return client; > } > -Original Message- From: robert lazarski [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 16, 2006 12:46 PM To: axis-user@ws.apache.org Subject: 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 <[EMAIL PROTECTED]> 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 > http://org.apache.axis2/xsd";> /> > > (No data "123" in this XML) > > > Any help is appreciated. > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
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 <[EMAIL PROTECTED]> 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 http://org.apache.axis2/xsd";> (No data "123" in this XML) Any help is appreciated. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Axis2: how to use Java POJO beans
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 http://org.apache.axis2/xsd";> (No data "123" in this XML) Any help is appreciated. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]