Hi Vivek,

Thanks for that. I used any ways java2wsdl from command line to generate java 
classes and I saw all the subclasses generated but when I called the web 
service, I got instantiation exception :-( . I will update you if I find any 
thing interesting

Thanks,

Petr

Vivekananda Moosani <[EMAIL PROTECTED]> wrote: Hi Petr,

The schema looks fine. You have an attribute "generateAllClasses" for the
ant task.
You can refer http://ws.apache.org/axis2/tools/1_3/CodegenToolReference.html
here for more options (both for command line execution and for the ant task)

Regards,
Vivek
________________________________________
From: Petr V. [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 21, 2007 3:42 AM
To: [email protected]
Subject: RE: Does Axis 2 allow passing of sub class objects ??

Thanks Moosani, I believe I am facing similar issue. Could you please help
me with following

I am seeing the snippet where I egenrate java classes from wsdl but not sure
how could I specify -g ?

 
wsdlFilename="http://localhost:8080/services/InventoryService?wsdl";
                  output="${build.dir}/client"
                  packageName="com.hp.cp.stubs.inv" databindingName="adb"
                         
namespaceToPackages="http://quickstart.samples/xsd=com.hp.cp.stubs.inv.xsd";
                 language="java"
                 synconly="true"

/>


and in wsdl, I added manually following snippet. Filter is an interface and
LocationFilter is a class implementing it


            
                
                    
                        
                            
type="xs:int"/>
                        
                    
                
            

Thanks in advance

Petr V.


Vivekananda Moosani  wrote:
Hello,
 
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
WSDL.
 
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!
 
-
Vivek
 
________________________________________
From: Petr V. [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 20, 2007 6:31 AM
To: [email protected]
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.

Thanks,
 
________________________________________
Be a better pen pal. Text or chat with friends inside Yahoo! Mail. See how.
DISCLAIMER ========== 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.


________________________________________
Never miss a thing. Make Yahoo your homepage.


DISCLAIMER
==========
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.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



       
---------------------------------
Be a better sports nut! Let your teams follow you with Yahoo Mobile. Try it now.

Reply via email to