aspose file tools*
The moose likes Web Services and the fly likes wsdl2java code generation for lists of custom objects Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "wsdl2java code generation for lists of custom objects" Watch "wsdl2java code generation for lists of custom objects" New topic
Author

wsdl2java code generation for lists of custom objects

Andre Peixoto
Greenhorn

Joined: Oct 16, 2012
Posts: 4
I would like to know if the tool "wsdl2java" (Axis2) is able to generate stubs that support getting list of custom ojects.

For instance, if I have a WS that have the following method:


Where Device is a custom class...

This tool can do that?

Thanks in advance!
Meghana Reddy
Ranch Hand

Joined: Jan 29, 2002
Posts: 76
Yes, you can use WSDL2Java to do that. Have you tried it and did you face any problem?


Meghana Reddy
Andre Peixoto
Greenhorn

Joined: Oct 16, 2012
Posts: 4
Hi,

I changed the return data type of my Web Service to an array because of that: http://www.ibm.com/developerworks/webservices/library/ws-tip-coding/index.html

They say that we should use arrays instead of collections. Before I tried with Lists but it was giving me some exception at client side...

So now I have a method like:

But now I'm having problem to extract the information of the classes generated by the tool...
I have this code:



is the class generated by the tool and is the local class that I want to have the information.

If I do:

I can see for each device as output:



But the getName() method return null instead of returning "Temperature"... Like this issue

Can anyone give me some help?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: wsdl2java code generation for lists of custom objects
 
Similar Threads
Help me in writing client foe this JAX ws Web service
How to create WS client automatically in Axis2
How do I consume Web Services in Swing
what wsdl2java tool for j2me cell phone ?
Axis 1.3 - WSDL2JAVA issue