Hi, Thank you for the response.
I have been able to move ahead and have java2ws identify the namespace of my request and response classes through the use of @XmlType jaxb annotation on these classes. However, I find, the resulting wsdl is missing the <wsdl:binding> and <wsdl:service> elements. I am wondering if on introducing the explicit jaxb annotation I need to set any specific flags for the java2ws call or on the SEI? Thanks. Amardeep -----Original Message----- From: Jason Whaley [mailto:[email protected]] Sent: Friday, June 10, 2011 5:19 AM To: [email protected] Subject: Re: java2ws: retaining request response namespace in wsdl What are you using for XML binding? If JAXB, have you JAXB annotated your MyResponse and MyRequest classes with JAXB annotations or included a package-info.java within the package both those classes are contained within? Both techniques allow you to specify a namespace on the resultant types generated in the schema. On Thu, Jun 9, 2011 at 4:45 PM, Sira, Amardeep <[email protected]> wrote: > Hi, > > I am running java2ws through the Java2WS cxf tool. I find that the resulting > wsdl does not retain the namespace for the Request / Response object tree. I > am wondering what kind of setup / annotation I can set to allow this to > happen? > > Ex, > @WebService(name = "MyService") > @SOAPBinding(style = Style.DOCUMENT, use = Use.LITERAL, parameterStyle > = ParameterStyle.BARE) public interface IMyService extends MyBase { > @WebResult(targetNamespace = "mypackage.response") > public MyResponse findNames( > @WebParam(targetNamespace = > "mypackage.request") MyRequest request); } > > Generates, > <wsdl:definitions name="MyService" targetNamespace="http://mypackage/" > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" > xmlns:tns="http://mypackage/" > xmlns:xsd="http://www.w3.org/2001/XMLSchema" > xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"> > <wsdl:types> > <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" > xmlns:tns="http://mypackage/" attributeFormDefault="unqualified" > elementFormDefault="unqualified" targetNamespace="http://mypackage/"> > > Whereas, I would expect, > <wsdl:definitions xmlns:apachesoap="http://xml.apache.org/xml-soap" > xmlns:impl="urn:mypackage" xmlns:intf="urn:mypackage" > xmlns:tns1="http://request.mypackage" > xmlns:tns5="http://response.mypackage" > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" > xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" > xmlns:xsd="http://www.w3.org/2001/XMLSchema" > targetNamespace="urn:mypackage"> > > Thank you. > > Amardeep > > > >
