aspose file tools*
The moose likes Web Services and the fly likes Why Axis can't deserialize my object if I write in this way? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Why Axis can Watch "Why Axis can New topic
Author

Why Axis can't deserialize my object if I write in this way?

Yashnoo lyo
Ranch Hand

Joined: Feb 17, 2003
Posts: 152
Hi friends:

I am developing WebService with axis. I want to publish a webservice in server.So I write a method:

See the above code ,the User Object!
After publish this method to web, when client invoke this method,Axis will serialize the User object and deserialize the User object for us. I don't have to declared anything in deploy.wsdd.
But if I change the method to the following :

I new an User object in this method, now Axis couldnd't deserialize the User object! It report an exception when client invoke this method:

So I add typeMapping in deploy.wsdd,But it is not useful ,Axis report that exception too. :-(

What's different between the two web service method?
Why Axis couldn't deserialize the User Object in the second method? Thks! :roll:


When I face C# and Java I choose Java.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42282
    
  64
Let's move this to the Web Services forum, where Axis is discussed.


Ping & DNS - my free Android networking tools app
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42282
    
  64
Have you used a tool like TCPMon or SOAPMonitor (both of which come with Axis) to look at the raw XML that is transferred over the wire?
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Why Axis can't deserialize my object if I write in this way?