soap - Unable to create java classes from WSDL using codehaus.mojo jaxb2-maven-plugin -
i unable create java classes using jaxb2-maven-plugin wsdl. see empty jaxb2 folder crated under target , dont see java classes in it. have wsdl placed correctly under resources folder itself. able create java classes other wsdl except below one. can please tell me whats problem below wsdl:
below wsdl:
<?xml version="1.0" encoding="utf-8"?> <definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" targetnamespace="http://xyz.retail.abc/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/xmlschema" xmlns:tns="http://xyz.retail.abc/"> <types></types> <message name="createcustomer_input"> <part name="firstname" type="xsd:string"></part> <part name="homephone" type="xsd:string"></part> <part name="lastname" type="xsd:string"></part> <part name="email" type="xsd:string"></part> </message> <message name="createcustomer_output"> <part name="custkey" type="xsd:string"></part> <part name="error_spccode" type="xsd:string"></part> <part name="error_spcmessage" type="xsd:string"></part> </message> <porttype name="xyz_spccreate_spcdigital_spcprospect_spcservice"> <operation name="createcustomer"> <input message="tns:createcustomer_input"></input> <output message="tns:createcustomer_output"></output> </operation> </porttype> <binding name="xyz_spccreate_spcdigital_spcprospect_spcservice" type="tns:xyz_spccreate_spcdigital_spcprospect_spcservice"> <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc"></soap:binding> <operation name="createdigiprospect"> <soap:operation soapaction="rpc/http://xyz.retail.abc/:createdigiprospect"></soap:operation> <input> <soap:body namespace="http://xyz.retail.abc/" use="literal"></soap:body> </input> <output> <soap:body namespace="http://xyz.retail.abc/" use="literal"></soap:body> </output> </operation> </binding> <service name="xyz_spccreate_spcdigital_spcprospect_spcservice"> <port binding="tns:xyz_spccreate_spcdigital_spcprospect_spcservice" name="xyz_spccreate_spcdigital_spcprospect_spcservice"> <soap:address location="https://abcxyz.int.net/eai_anon_xyz_ttlinsight_enu/start.swe?sweextsource=securewebservice&sweextcmd=execute"></soap:address> </port> </service> </definitions>
below plugin configuration in pom.xml
<build> <finalname>${project.artifactid}</finalname> <resources> <resource> <directory>src/main/resources</directory> </resource> <resource> <directory>src/main/java/com/xyz/rap/service/impl/wsdl</directory> <targetpath>wsdl</targetpath> </resource> <resource> <directory>src/main/config</directory> <targetpath>config</targetpath> </resource> </resources> <plugins> <plugin> <groupid>org.codehaus.mojo</groupid> <artifactid>jaxb2-maven-plugin</artifactid> <version>1.6</version> <executions> <execution> <id>xjc</id> <goals> <goal>xjc</goal> </goals> </execution> </executions> <configuration> <!-- package store generated file --> <packagename>com.xxx.gen.retail.abc</packagename> <!-- treat input wsdl --> <wsdl>true</wsdl> <!-- input not xml schema --> <xmlschema>false</xmlschema> <!-- location of wsdl file --> <schemadirectory>${project.basedir}/src/main/resources</schemadirectory> <!-- wsdl file saved earlier --> <schemafiles>gene.wsdl</schemafiles> <!-- don't clear output directory on each run --> <clearoutputdir>false</clearoutputdir> </configuration> </plugin> <plugin> <groupid>org.apache.maven.plugins</groupid> <artifactid>maven-compiler-plugin</artifactid> <configuration> <!-- or whatever version use --> <source>1.7</source> <target>1.7</target> </configuration> </plugin> </plugins> </build>
Comments
Post a Comment