My mistake....I was looking at methods of wrong class (WsDocGenTask instead of 
WsGenTask) while figuring out the flags which can be set on wsgen task.
 
I noticed later that we can set the "forceBare=false" in ant task, however, 
that is also default, hence, wsgen should have by default generated WRAPPED 
style of web service in my case.  
 
The reason it generated BARE style web service was probably because xsd 
elements "SomeMethod" and "SomeMethodResponse" which were input and output 
respectively for the "SomeMethod" web service method were in different 
namespace than that of wsdl:operation "SomeMethod".
 
I fixed my WSDL such that targetNameSpace of my WSDL and that of XSD elements 
defining input and output parameter for web method were same.
 
After doing above change, wsgen generated WRAPPED style web service, and it 
worked fine when I tested using SOAPui.
 
Regards,
Srikanth 

________________________________

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Thu 5/24/2007 8:43 PM
To: [email protected]
Subject: [xfire-user] How to generate Wrapped-style code using wsgen?


Hi,
 
I am doing contract-first style of development with XFire 1.2.6.
 
After running my WSDL through the wsgen ant task, the web service stub has 
parameter style of BARE, and the web service method also is in accordance with 
that.
 
@SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL, 
parameterStyle = SOAPBinding.ParameterStyle.BARE)

    public SomeMethodResponse SomeMethod(
        @WebParam(name = "SomeMethod", targetNamespace = "http://webservices";)
        mypackage.SomeMethod SomeMethod);

However, I was wondering whether there is any switch which can be applied to 
"wsgen" to make it generated WRAPPED parameter style web service.
Please clarify.
 
Thanks,
Srikanth
 

The information contained in this electronic message and any attachments to 
this message are intended for the exclusive use of the addressee(s) and may 
contain proprietary, confidential or privileged information. If you are not the 
intended recipient, you should not disseminate, distribute or copy this e-mail. 
Please notify the sender immediately and destroy all copies of this message and 
any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient should 
check this email and any attachments for the presence of viruses. The company 
accepts no liability for any damage caused by any virus transmitted by this 
email.

www.wipro.com
        



The information contained in this electronic message and any attachments to 
this message are intended for the exclusive use of the addressee(s) and may 
contain proprietary, confidential or privileged information. If you are not the 
intended recipient, you should not disseminate, distribute or copy this e-mail. 
Please notify the sender immediately and destroy all copies of this message and 
any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient should 
check this email and any attachments for the presence of viruses. The company 
accepts no liability for any damage caused by any virus transmitted by this 
email.
 
www.wipro.com

Reply via email to