Using org.codehaus.mojo > axistools-maven-plugin for wsdl2java generation. Plugin specified in pom.xml is as below:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>axistools-maven-plugin</artifactId>
<version>1.4</version>
<configuration>
<sourceDirectory>${basedir}/src/wsdl/</sourceDirectory>
<typeMappingVersion>1.2</typeMappingVersion>
<wrapArrays>false</wrapArrays>
</configuration>
<executions>
<execution>
<id>all</id>
<configuration>
<wsdlFiles>
<wsdlFile>Market.wsdl</wsdlFile>
<wsdlFile>Payment.wsdl</wsdlFile>
<wsdlFile>Customer.wsdl</wsdlFile>
</wsdlFiles>
<bindingFiles>
<bindingFile>${basedir}/src/wsdl/globalBinding.xml</bindingFile>
</bindingFiles>
</configuration>
<goals>
<goal>wsdl2java</goal>
</goals>
</execution>
</executions>
</plugin>
globalBinding.xml
<?xml version="1.0" encoding="UTF-8"?>
<jaxws:bindings
xmlns:jaxws="http://java.sun.com/xml/ns/jaxws"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
node="wsdl:definitions/wsdl:types/xs:schema"
wsdlLocation="Customer.wsdl"
xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" version="2.1"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<jaxws:globalBindings>
<jaxws:javaType name="java.math.BigDecimal"
xmlType="xsd:decimal"
parseMethod="javax.xml.bind.DatatypeConverter.parseDecimal"
printMethod="javax.xml.bind.DatatypeConverter.printDecimal" />
</jaxws:globalBindings>
</jaxws:bindings>
wanted to do this mapping as compilation is failing for one of the xsd:complexType where xsd:restriction base="xsd:decimal" because of which compilation error is coming as:
constructor Object in class java.lang.Object cannot be applied to given types;
[ERROR] required: no arguments
[ERROR] found: java.math.BigDecimal
[ERROR] reason: actual and formal argument lists differ in length
to fix this error trying to add bindings but it seems globalBinding is not getting used.