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

Nested Abstract classes are not converted correctly from a WSDL

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.1.5
    • None
    • Soap Binding
    • None
    • MacOS 10.11.3, Apache CXF 3.1.5, SoapUI 5.2.1, Oxygen 17.1

    • Unknown

    Description

      The attached example features a message and wrapped header. Both are defined in "abstract.xsd" (with appropriate namespace). In "concrete.xsd" both two new types are defined, both deriving from their respective partners in "abstract". The concrete:message is now wrapping a concrete:header. In the "service.wsdl" i define a service, using the concrete:message in a wrapper element.
      Now I use "wsdl2java" for convertion, add a dash of spring-boot to get the whole thing running. The end-result is that for a message like

      <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
      <soapenv:Header/>
      <soapenv:Body>
      <payload>
      <content>
      <header>
      <comment>fdsafdsafdsafdsa</comment>
      </header>
      </content>
      </payload>
      </soapenv:Body>
      </soapenv:Envelope>

      i run into an unmarshalling-exception (also attached). The Server apparently tries to instantiate the abstract class (from "abstract.xsd"), not the one from concrete.xsd. I double checked with SoapUI and Oxygen, both seem to have no problem with the wsdl.
      Of course, removing the "abstract" from the abstract-Header solves the problem, but that is not really a solution for a contract-first driven project.

      Attachments

        1. MWE.zip
          19 kB
          Julian Peters

        Activity

          People

            Unassigned Unassigned
            julpet Julian Peters
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: