axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vivekananda Moosani" <>
Subject RE: Does Axis 2 allow passing of sub class objects ??
Date Tue, 20 Nov 2007 05:45:29 GMT


We had a similar case. We were generating both sever side and client classes
from WSDL. We had a DataNode type which gets passed in the WebService
methods. But the client can also send a subtype like StructuredDataNode or
UnstructuredDataNode. We had the subtypes even defined in the schema in the


If you have a similar situation then while generating classes also give -g
option to WSDL2Java. This generates classes for types which are not directly
used in Web service operations like the sub type in this case. You can pass
a subtype in the calls to Web Service methods. 


Hope this helps!






From: Petr V. [] 
Sent: Tuesday, November 20, 2007 6:31 AM
Subject: Does Axis 2 allow passing of sub class objects ??


Let's assume that I have a web service that has an operation

void fun(MyInterface if) 

can I call it like 

fun(mo); where mo is of type MyObject that implements MyInterface.

Does Axis 2 and web services in general support this i-e passing object of
sub class or implementing class for interface.




Be a better pen pal. Text or chat with friends inside Yahoo! Mail. See
<*http:/>  how.

This e-mail may contain privileged and confidential information which is the property of Persistent
Systems Ltd. It is intended only for the use of the individual or entity to which it is addressed.
If you are not the intended recipient, you are not authorized to read, retain, copy, print,
distribute or use this message. If you have received this communication in error, please notify
the sender and delete all copies of this message. Persistent Systems Ltd. does not accept
any liability for virus infected mails.

View raw message