Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to access a class defined within a class in WebService

 
Kedar sk
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).
 
Kedar sk
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic