cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joshua Shannon (JIRA)" <>
Subject [jira] [Created] (CXF-5061) Invalid WSDL generated created for List of Complex Type
Date Thu, 06 Jun 2013 13:24:21 GMT
Joshua Shannon created CXF-5061:

             Summary: Invalid WSDL generated created for List of Complex Type
                 Key: CXF-5061
             Project: CXF
          Issue Type: Bug
          Components: JAX-WS Runtime, JAXB Databinding
    Affects Versions: 2.7.5
         Environment: Windows 7, Tomcat 7.0.30, Java 1.7.0_07
            Reporter: Joshua Shannon

We are using CXF to do Code First development of both SOAP and REST web services. Here is
our interface for the web service:

@WebService(name = "TestService",
		portName = "TestServicePort",
		serviceName = "TestService",
		targetNamespace = "")
@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
public interface TestService
	@WebMethod(operationName = "getList")
	public List<WrapperString> getList();

Whenever CXF creates the WSDL for the implementing class, the WSDL is invalid. Here is the
WSDL that is created:

<?xml version='1.0' encoding='UTF-8'?><wsdl:definitions xmlns:xsd=""
xmlns:wsdl="" xmlns:tns=""
xmlns:soap="" xmlns:ns1=""
name="TestService" targetNamespace="">
<xsd:schema xmlns:xsd="" xmlns:ns0=""
elementFormDefault="qualified" targetNamespace="">
  <xsd:complexType name="wrapperStringArray">
      <xsd:element maxOccurs="unbounded" minOccurs="0" name="item" nillable="true" type="ns0:WrapperString"/>
  <xsd:complexType name="WrapperString">
      <xsd:element minOccurs="0" name="value" type="xsd:string"/>
  <xsd:element name="wrapperString" type="ns0:WrapperString"/>
<xsd:schema xmlns:xsd="" xmlns:tns=""
xmlns:ns0="" attributeFormDefault="unqualified"
elementFormDefault="qualified" targetNamespace="">
  <xsd:import namespace=""/>
  <xsd:element name="getListResponse" nillable="true" type="ns0:WrapperStringArray"/>
  <wsdl:message name="getListResponse">
    <wsdl:part element="tns:getListResponse" name="getListResponse">
  <wsdl:message name="getList">
  <wsdl:portType name="TestService">
    <wsdl:operation name="getList">
      <wsdl:input message="tns:getList" name="getList">
      <wsdl:output message="tns:getListResponse" name="getListResponse">
  <wsdl:binding name="TestServiceSoapBinding" type="tns:TestService">
    <soap:binding style="document" transport=""/>
    <wsdl:operation name="getList">
      <soap:operation soapAction="" style="document"/>
      <wsdl:input name="getList">
        <soap:body use="literal"/>
      <wsdl:output name="getListResponse">
        <soap:body use="literal"/>
  <wsdl:service name="TestService">
    <wsdl:port binding="tns:TestServiceSoapBinding" name="TestServicePort">
      <soap:address location="http://mtefile/services/soap/test"/>

Notice that the complexType is named "wrapperStringArray" yet the getListResponse is trying
to use the type of "ns0:WrapperStringArray". The bug is that the case of the types does not
match. I think the getListResponse type should be a lowercase "w". I ran another test with
a List<String> and the types were correctly generated to "stringArray". It seems like
CXF is messing the capitalization of the type when using complex objects. This is quite a
high priority issue so we can get SOAP services to work correctly with a valid WSDL.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message