bjornvester / wsdl2java-gradle-plugin

A Gradle plugin for generating Java classes from WSDL files
MIT License
40 stars 14 forks source link

Unable to generate Java clases when WSDL imports XSD from the web #27

Open Matej-Hlatky opened 1 year ago

Matej-Hlatky commented 1 year ago

When generating Java from WSDL file that contains

<xsd:schema targetNamespace="http://foo.bar/Imports">
    <xsd:import schemaLocation="http://foo.bar/xsd_file.xsd" namespace="http://foo.bar/Service" />
</xsd:schema>

this error occurs:

org.apache.cxf.BusException: No conduit initiator was found for the namespace http://cxf.apache.org/transports/http.
    at org.apache.cxf.bus.managers.ConduitInitiatorManagerImpl.getConduitInitiator(ConduitInitiatorManagerImpl.java:108)
    at org.apache.cxf.transport.TransportURIResolver.resolve(TransportURIResolver.java:105)
    at org.apache.cxf.wsdl11.CatalogWSDLLocator.getImportInputSource(CatalogWSDLLocator.java:111)
    at org.apache.cxf.wsdl11.AbstractWrapperWSDLLocator.getImportInputSource(AbstractWrapperWSDLLocator.java:108)
    at com.ibm.wsdl.xml.WSDLReaderImpl.parseImport(WSDLReaderImpl.java:388)
    at com.ibm.wsdl.xml.WSDLReaderImpl.parseDefinitions(WSDLReaderImpl.java:312)
    at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:2352)

When manually downloaded and saved those XSD files and updated paths in source WSDL, this error no longer occur.

karl-dpg commented 1 month ago

Have you ever found a solution?