Get Java classes from multiple wsdls
•
Java
I have a maven project where I need to generate Java classes from multiple WSDL files
I have checked this link: http://decimalsolutions.blogspot.in/2011/10/wsdl2java-maven2.html But it didn't solve my problem
How do you do this?
Solution
Documentation declares that you can use < extraarg > elements to pass parameters to WDSL to Java process Therefore, you can configure CXF CodeGen plugin as follows
<configuration> <sourceRoot>${project.build.directory}/generated-code/mywebservice</sourceRoot> <wsdlOptions> <wsdlOption> <wsdl>${basedir}/src/main/resources/wsdl/serviceOne.wsdl</wsdl> <extraargs> <extraarg>-p</extraarg> <extraarg>first.packagename</extraarg> </extraargs> </wsdlOption> <wsdlOption> <wsdl>${basedir}/src/main/resources/wsdl/serviceTwo.wsdl</wsdl> <extraargs> <extraarg>-p</extraarg> <extraarg>another.packagename</extraarg> </extraargs> </wsdlOption> </wsdlOptions> </configuration>
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码