File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes How to access a class defined within a class in WebService Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "How to access a class defined within a class in WebService" Watch "How to access a class defined within a class in WebService" New topic
Author

How to access a class defined within a class in WebService

Kedar sk
Greenhorn

Joined: Jan 19, 2010
Posts: 4
Hi,
I am trying to develop a web service call Car which has a class Tyre defined within it as shown below


I have generated client stub using wsdl2java Eclipse pluging with "default" settings. But the Client stub class does not show any functions such as get_tyre or setTyre.

Any suggestions would be appreciated.
If this a repost, sorry.Please direct me to older post in your reply
Thanks


Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41029
    
  43
What API are you using - JAX-WS? If so, you'd use the @WebMethod annotation to indicate which methods you want to expose. It's possible that that doesn't work with nested classes, though (in which the outer class needs to provide setters and getters which you can annotate).


Ping & DNS - my free Android networking tools app
Kedar sk
Greenhorn

Joined: Jan 19, 2010
Posts: 4
Thanks for your reply, I am using ADB api, but I found what the problem was the inner class was not defined in wsdl, when I searched for the solution, on Issues Apache and got it under this link Fix for the inner classes issue (attached)
 
 
subject: How to access a class defined within a class in WebService
 
Similar Threads
not getting how exactly spring Depedency Injection works.
EJBand RMI
Error: 'void' type not allowed here
Difference between Dependency and Association
Problem with default '' , 0 and 0.0 being inserted into database while using JSTL.