File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Web Services and the fly likes jax-ws support for java inheritance types Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "jax-ws support for java inheritance types" Watch "jax-ws support for java inheritance types" New topic

jax-ws support for java inheritance types

manish ahuja
Ranch Hand

Joined: Oct 23, 2003
Posts: 312
Hi there,

I have a bottom up web service generated for a java app. The input/output classes for the java app are custom types.

Something like this: CustomOutput runBusiness(CustomInput)

CustomInput is something like this
int id; String name; String description;
Myobject obj; //concrete object
MyType typeObj; // generic type obj;
Per the java app design MyType obj was created to accept any of the derived types and keep the interface generic. So accordingly derived classes of MyType like (AType, BType etc can be passed as part of the CustomInput object). MyType does not have any attributes of its own its more like a baseDto.

Now when I have generated the web service artifacts the converted schema shows a Mytype attribute with its internal content blank.

How should i be able to slam in appropriate type (Atype,Btype with their attributes) so the calling web service client can see exactly what it needs to pass.

Let me know how to tackle this situation. Do I have to create separate webservice or should I tweak the java customInput object.

subject: jax-ws support for java inheritance types
It's not a secret anymore!