my project is using cxf-codegen
plugin to generated java code from wsdl
and the structure of the generated files was as below:
but when I upgraded the version from 3.5.5 to 4.0.3, the structure of the generated files become different and there are some missing code inside generated classes although I didn't change any thing in wsdl file.
the new structure as below:
here is cxf-codegen plugin:
<plugin>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-codegen-plugin</artifactId>
<version>${cxf.version}</version>
<executions>
<execution>
<id>generate-sources</id>
<phase>generate-sources</phase>
<configuration>
<sourceRoot>${project.build.directory}/generated-sources/cxf</sourceRoot>
<wsdlOptions>
<wjsdlOption>
<wsdl>${project.basedir}/src/main/resources/CustomerAgreementVBS/WSDL/CustomerAgreementVBS.wsdl</wsdl>
<wsdlLocation>CustomerAgreementVBS/WSDL/CustomerAgreementVBS.wsdl</wsdlLocation>
<extraargs>
<extraarg>-b</extraarg>
<extraarg>${project.basedir}/src/main/resources/CustomerAgreementVBS/WSDL/service_mapping.xml
</extraarg>
</extraargs>
<extendedSoapHeaders>true</extendedSoapHeaders>
</wjsdlOption>
</wsdlOptions>
</configuration>
<goals>
<goal>wsdl2java</goal>
</goals>
</execution>
</executions>
</plugin>
and here is extraarg service_mapping.xml
file:
<?xml version="1.0"?>
<jaxws:bindings
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
wsdlLocation="CustomerAgreementVBS.wsdl"
xmlns:jaxws="http://java.sun.com/xml/ns/jaxws">
<jaxws:bindings node="wsdl:definitions">
<jaxws:package name="com.example.dxl.gr.ws.client.customeragreement"/>
<jaxws:enableAsyncMapping>true</jaxws:enableAsyncMapping>
<handler-chains xmlns="http://java.sun.com/xml/ns/javaee">
<handler-chain>
</handler-chain>
</handler-chains>
</jaxws:bindings>
</jaxws:bindings>
Does any one know why this is happening?
solution was in service_mapping.xml
file. it should be as below:
<?xml version="1.0"?>
<jaxws:bindings
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
wsdlLocation="CustomerAgreementVBS.wsdl"
xmlns:jaxws="https://jakarta.ee/xml/ns/jaxws">
<jaxws:bindings node="wsdl:definitions">
<jaxws:package name="com.example.dxl.gr.ws.client.customeragreement"/>
<jaxws:enableAsyncMapping>true</jaxws:enableAsyncMapping>
</jaxws:bindings>
</jaxws:bindings>