Not generating any classes for given wsdl file
I have two files. One works fine with the jaxb plugin for maven but the other one does not generate any classes. However, other services have no problem to recognise the file as a soap wsdl file.
When using the following file, it only generates a sun.jaxb.episode file. No error is thrown but no classes are generated either.
pom.xml:
<build>
<plugins>
<plugin>
<groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb2-plugin</artifactId>
<version>0.14.0</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
<configuration>
<schemaDirectory>${project.basedir}/src/main/resources/wsdl</schemaDirectory>
<schemaIncludes>
<include>*.wsdl</include>
</schemaIncludes>
</configuration>
</plugin>
</plugins>
</build>
wsdl-file:
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://tempuri.org/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" name="IAWLSOAPservice" targetNamespace="http://tempuri.org/">
<message name="ProcessName0Request">
<part name="FirstName" type="xs:string"/>
<part name="LastName" type="xs:string"/>
<part name="user" type="xs:string"/>
<part name="pwd" type="xs:string"/>
<part name="OrgClient" type="xs:string"/>
</message>
<message name="ProcessName0Response">
<part name="return" type="xs:string"/>
</message>
<message name="ProcessNameExt1Request">
<part name="FirstName" type="xs:string"/>
<part name="LastName" type="xs:string"/>
<part name="DOB" type="xs:string"/>
<part name="Nationality" type="xs:string"/>
<part name="Country" type="xs:string"/>
<part name="Address" type="xs:string"/>
<part name="City" type="xs:string"/>
<part name="State" type="xs:string"/>
<part name="Zip" type="xs:string"/>
<part name="user" type="xs:string"/>
<part name="pwd" type="xs:string"/>
<part name="OrgClient" type="xs:string"/>
</message>
<message name="ProcessNameExt1Response">
<part name="return" type="xs:string"/>
</message>
<message name="GetRecordStatus2Request">
<part name="BusinessCaseID" type="xs:string"/>
<part name="user" type="xs:string"/>
<part name="pwd" type="xs:string"/>
<part name="OrgClient" type="xs:string"/>
</message>
<message name="GetRecordStatus2Response">
<part name="return" type="xs:string"/>
</message>
<message name="GetQueryStatus3Request">
<part name="BusinessCaseID" type="xs:string"/>
<part name="user" type="xs:string"/>
<part name="pwd" type="xs:string"/>
<part name="OrgClient" type="xs:string"/>
</message>
<message name="GetQueryStatus3Response">
<part name="return" type="xs:string"/>
</message>
<message name="GetQueryResultsXML4Request">
<part name="BusinessCaseID" type="xs:string"/>
<part name="user" type="xs:string"/>
<part name="pwd" type="xs:string"/>
<part name="OrgClient" type="xs:string"/>
</message>
<message name="GetQueryResultsXML4Response">
<part name="return" type="xs:string"/>
</message>
<message name="GetQueryResultsHTML5Request">
<part name="BusinessCaseID" type="xs:string"/>
<part name="user" type="xs:string"/>
<part name="pwd" type="xs:string"/>
<part name="OrgClient" type="xs:string"/>
</message>
<message name="GetQueryResultsHTML5Response">
<part name="return" type="xs:string"/>
</message>
<portType name="IAWLSOAP">
<operation name="ProcessName">
<input message="tns:ProcessName0Request"/>
<output message="tns:ProcessName0Response"/>
</operation>
<operation name="ProcessNameExt">
<input message="tns:ProcessNameExt1Request"/>
<output message="tns:ProcessNameExt1Response"/>
</operation>
<operation name="GetRecordStatus">
<input message="tns:GetRecordStatus2Request"/>
<output message="tns:GetRecordStatus2Response"/>
</operation>
<operation name="GetQueryStatus">
<input message="tns:GetQueryStatus3Request"/>
<output message="tns:GetQueryStatus3Response"/>
</operation>
<operation name="GetQueryResultsXML">
<input message="tns:GetQueryResultsXML4Request"/>
<output message="tns:GetQueryResultsXML4Response"/>
</operation>
<operation name="GetQueryResultsHTML">
<input message="tns:GetQueryResultsHTML5Request"/>
<output message="tns:GetQueryResultsHTML5Response"/>
</operation>
</portType>
<binding name="IAWLSOAPbinding" type="tns:IAWLSOAP">
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="ProcessName">
<soap:operation soapAction="urn:AWLSOAP-IAWLSOAP#ProcessName" style="rpc"/>
<input message="tns:ProcessName0Request">
<soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:AWLSOAP-IAWLSOAP"/>
</input>
<output message="tns:ProcessName0Response">
<soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:AWLSOAP-IAWLSOAP"/>
</output>
</operation>
<operation name="ProcessNameExt">
<soap:operation soapAction="urn:AWLSOAP-IAWLSOAP#ProcessNameExt" style="rpc"/>
<input message="tns:ProcessNameExt1Request">
<soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:AWLSOAP-IAWLSOAP"/>
</input>
<output message="tns:ProcessNameExt1Response">
<soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:AWLSOAP-IAWLSOAP"/>
</output>
</operation>
<operation name="GetRecordStatus">
<soap:operation soapAction="urn:AWLSOAP-IAWLSOAP#GetRecordStatus" style="rpc"/>
<input message="tns:GetRecordStatus2Request">
<soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:AWLSOAP-IAWLSOAP"/>
</input>
<output message="tns:GetRecordStatus2Response">
<soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:AWLSOAP-IAWLSOAP"/>
</output>
</operation>
<operation name="GetQueryStatus">
<soap:operation soapAction="urn:AWLSOAP-IAWLSOAP#GetQueryStatus" style="rpc"/>
<input message="tns:GetQueryStatus3Request">
<soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:AWLSOAP-IAWLSOAP"/>
</input>
<output message="tns:GetQueryStatus3Response">
<soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:AWLSOAP-IAWLSOAP"/>
</output>
</operation>
<operation name="GetQueryResultsXML">
<soap:operation soapAction="urn:AWLSOAP-IAWLSOAP#GetQueryResultsXML" style="rpc"/>
<input message="tns:GetQueryResultsXML4Request">
<soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:AWLSOAP-IAWLSOAP"/>
</input>
<output message="tns:GetQueryResultsXML4Response">
<soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:AWLSOAP-IAWLSOAP"/>
</output>
</operation>
<operation name="GetQueryResultsHTML">
<soap:operation soapAction="urn:AWLSOAP-IAWLSOAP#GetQueryResultsHTML" style="rpc"/>
<input message="tns:GetQueryResultsHTML5Request">
<soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:AWLSOAP-IAWLSOAP"/>
</input>
<output message="tns:GetQueryResultsHTML5Response">
<soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:AWLSOAP-IAWLSOAP"/>
</output>
</operation>
</binding>
<service name="IAWLSOAPservice">
<port name="IAWLSOAPPort" binding="tns:IAWLSOAPbinding">
<soap:address location="http://somedomain.com/Scripts/AMLWebServiceISAPI.dll/soap/IAWLSOAP"/>
</port>
</service>
</definitions>
When using a differently formatted wsdl file, it generates the classes fine. So the problem seems to be with JAXB in combination with my wsdl-file. Any ideas why it cannot generate any java classes?
I have a similar issue. Were you able to resolve it?
Hi @tsposato / @simibac
With latest version of the plugin, you should use the following configuration in the plugin
<schemaLanguage>wsdl</schemaLanguage>
XJC changes in 2.3.6+ the language detection so you should now set schemaLanguage for WSDL files to wsdl in your configuration.
In addition, WSDL generation is "experimental" with jaxb-xjc.
It seems to only generate types from <wsdl:types> in WSDL files.
Could you please adapt your WSDL or use cxf-codegen-plugin for WSDL file which really support WSDL ?
Thanks