Invalid namespace qualification in Java to WSDL mapping
-------------------------------------------------------
Key: CXF-1735
URL: https://issues.apache.org/jira/browse/CXF-1735
Project: CXF
Issue Type: Bug
Components: JAX-WS Runtime
Affects Versions: 2.0.8
Reporter: Jarek Gawor
I have the following SEI:
@WebService(name = "Greeter", targetNamespace =
"http://apache.org/greeter_control")
public interface Greeter {
@WebMethod
@WebResult(name = "responseType", targetNamespace =
"http://apache.org/greeter_control/types")
@RequestWrapper(localName = "greetMe", targetNamespace =
"http://apache.org/greeter_control/types", className =
"org.apache.greeter_control.types.GreetMe")
@ResponseWrapper(localName = "greetMeResponse", targetNamespace =
"http://apache.org/greeter_control/types", className =
"org.apache.greeter_control.types.GreetMeResponse")
public String greetMe(
@WebParam(name = "requestType", targetNamespace =
"http://apache.org/greeter_control/types")
String requestType);
}
?wsdl request on a service that implements this SEI contains the following
schema:
<xsd:schema attributeFormDefault="unqualified" elementFormDefault="unqualified"
targetNamespace="http://apache.org/greeter_control/types"
xmlns="http://apache.org/greeter_control/types"
xmlns:tns="http://apache.org/greeter_control"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<import namespace="http://apache.org/greeter_control"
xmlns="http://www.w3.org/2001/XMLSchema" />
<xsd:element name="greetMe" type="greetMe" />
<xsd:complexType name="greetMe">
<xsd:sequence>
<xsd:element minOccurs="0" name="requestType" type="xsd:string" />
</xsd:sequence>
</xsd:complexType>
<xsd:element name="greetMeResponse" type="greetMeResponse" />
<xsd:complexType name="greetMeResponse">
<xsd:sequence>
<xsd:element minOccurs="0" name="responseType" type="xsd:string" />
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
Notice, the elementFormDefault="unqualified" attribute on the schema. That
means that the requestType and responseType elements are unqualified in the
schema. However, the annotation defines explicit namespaces for these elements.
When actaully invoking the service, the service will expect the requestType
element to be unqualified. If the requestType element is qualified on the wire,
the "requestType" parameter in Java code will be passed as null.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.