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

CXF WSDLToJava Generation fails if included XSD needs redirecting

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.3.1
    • 3.3.2
    • None
    • None
    • Unknown

    Description

      I need to generate a Java WS client from a WSDL file that includes a XSD schema via <xs:include> with attribute schemaLocation="http://<path>".

      The problem I have now is caused by the fact that the XSD file is not available through http any more, only via https.
      When I execute client generation with WSDLToJava I get the very confusing error message
      org.apache.cxf.tools.common.ToolException: org.apache.cxf.wsdl11.WSDLRuntimeException: Fail to create wsdl definition <wsdl_uri>: WSDLException (at /definitions/types/xs:schema): faultCode=PARSER_ERROR: Problem parsing 'http://<xsd_path>'.: org.xml.sax.SAXParseException: White spaces are required between publicId and systemId.

      Debugging the code generation showed that WSDLToJava has two problems:
      First the default conduit behavior in TransportURIResolver has autoredirect switched off. OK, I can change this myself from outside by setting a special HTTPConduitConfigurer.
      Second, and here I can't change the behavior from outside, the used URIResolver in CustomizedWSDLLocator does not support redirecting.

      Attachments

        1. cxf-URIResolver.patch
          3 kB
          Andreas Rusch

        Issue Links

          Activity

            People

              Unassigned Unassigned
              ivy-arus Andreas Rusch
              Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m