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



Reply via email to