Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-1769

Nillable schema elements in WSDL cause XmlSchemaException

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.1.2
    • 2.0.9, 2.1.3
    • JAX-WS Runtime
    • None

    Description

      A WSDL with a nillable schema element, e.g.

      <element name="sayHelloResponse">
      <complexType>
      <sequence>
      <element name="output" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true" />
      </sequence>
      </complexType>
      </element>

      can be used to generate a JAX-WS front end, but when trying to recreate the WSDL via reflection, the following exception is thrown:

      "org.apache.ws.commons.schema.XmlSchemaException: Schema name conflict in collection. Namespace: urn:example-helloworld"

      Steps to reproduce:

      1. Use WSDLToJava to generate a JAXWS frontend from the provided WSDL.
      2. Use JavaToWS to generate a new WSDL from the generated JAXWS frontend.

      If you remove the 'nillable="true"' from the wsdl, then this error goes away.

      Attachments

        1. HelloWorld.wsdl
          3 kB
          John Hite
        2. build.xml
          3 kB
          John Hite

        Activity

          People

            dkulp Daniel Kulp
            jhite John Hite
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: