axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anne Thomas Manes" <atma...@gmail.com>
Subject Re: POJO WS question
Date Fri, 28 Sep 2007 12:56:38 GMT
Don't use overloaded methods with SOAP.

Anne

On 9/27/07, Brian Neate <bneate@alarmpoint.com> wrote:
>
>
>
>
> Hey Guys,
>
>
>
> I'm writing a POJO web service using Axis 1.1.1 and am seeing some odd
> behavior when I have a class as a argument to an exposed method when that
> class has both a default constructor and a constructor with a single String
> argument.  The problem is that when I call this web service the constructor
> with a single string argument is always being called with the full class
> name causing the string to never be set on that object.
>
>
>
> For example:
>
> //Class that holds the string argument
>
> Package com.test;
>
> Public class StringHolder{
>
>                 Private String str;
>
>                 Public StringHolder() { }
>
>                 Public StringHolder(String str) { this.str = str; }
>
>
>
>                 Public void setStr(String str) { this.str = str; }
>
>                 Public String getStr() { return str ; }
>
> }
>
>
>
> //Exposed Method
>
> Public String echoString(StringHolder holder){
>
>                 Return holder.getStr();
>
> }
>
>
>
> Will always return a string like com.test.StringHolder@1fc28 instead of what
> was passed in the soap request.
>
>
>
> This is easy enough to overcome but is pretty odd.  Does anyone know if this
> has been fixed in a later release?
>
>
>
> Thanks,
>
> Brian Neate

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


Mime
View raw message