Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jax-ws support for java inheritance types

 
manish ahuja
Ranch Hand
Posts: 312
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.


Regards,
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic