• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

wsdl2java code generation for lists of custom objects

 
Andre Peixoto
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, you can use WSDL2Java to do that. Have you tried it and did you face any problem?
 
Andre Peixoto
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic