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

Generate JAVA classes from XSD hierarchy without namespace

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.3.0, 3.3.1
    • None
    • Configuration
    • None
    • Unknown
    • Important

    Description

      I have a set of XSD files from a client. I need to generate java classes from those. One of the XSDs imports another without namespace. That fails the mvn generate-sources with an error: _src-resolve: Cannot resolve the name 'faultstring' to a 'element declaration' component. org.xml.sax.SAXParseException; systemId: file:/src/main/resources/Common/SOAP_Fault_v4_0_0.xsd_

      I am using openjdk 11 with version 3.3.0 of cxf-xjc-plugin to generate classes. Attached is the project.

      I have tried to generate the child XSD (SOAP_Fault_v4_0_0) separately and used bindings file to refer to the generated class from parent(Envelope). Doesnt work.

      When I give a namespace to the child XSD SOAP_FaultElements_v4_0_0.xsd and refer in SOAP_Fault_v4_0_0.xsd using the prefix, it generates the classes fine but then it doesn't match with the client response. I cannot modify the client XSDs as that is out of my scope. However if a modification doesn't alter the namespaces and structure, I can give it a try.

      Reference project is attached.

      Attachments

        1. soap-consumer.zip
          68 kB
          Anisha Kapoor

        Activity

          People

            Unassigned Unassigned
            anisha1594 Anisha Kapoor
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: