axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Niklas Wirstrom <n...@sics.se>
Subject Re: Arguments of class Object in POJOs
Date Thu, 29 May 2008 07:56:36 GMT
Yes, the client stub takes the correct parameters, but the object 
received on the server is a DataHandler. If you call your service (e.g. 
with a String) what class does the object o have?

( I am familiar with the use of DataHandlers for binary data, and that 
works fine for me)

/Niklas

Paul Fremantle wrote:
> Niklas
>
> The DataHandler type is used for binary data (it efficiently supports
> large data), so I'm surprised that the data is being bound to that.
>
> There must be more to what you are telling us :) The reason I say this
> is because if you take a simple POJO:
>
> class Pojo {
>   public Object hello(Object o) {
>     return o;
>   }
> }
>
> and deploy in Axis2, and then run WSDL2Java against the generated
> WSDL, you get this client stub:
>
> public  java.lang.Object hello(java.lang.Object param01)
>
> Which I think is the behaviour you want.
>
> Paul
>
>
> On Thu, May 29, 2008 at 8:19 AM, Niklas Wirstrom <niwi@sics.se> wrote:
>   
>> Hi,
>> I have a POJO service that I have decided to move from Axis1 to Axis2. I
>> have, however run in to some problems: Methods taking arguments of class
>> java.lang.Object (and arrays of that class), receive a
>> javax.activation.DataHandler object instead of the "real" object. Other
>> methods that takes other kinds of arguments work fine.
>>
>> Is there a way to fix this problem without changing the code on the server?
>>
>> This is how I have done:
>> I deploy the service. I generate client the stub using Axis2's wsdl2java,
>> and the wsdl file created by Axis2. I call the method (that takes an Object
>> argument) with an argument of class java.lang.String. The service receives
>> the DataHandler object.
>>
>> Please help
>> /Niklas
>>
>> ---------------------------------------------------------------------
>> 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


Mime
View raw message