Maven CXF wsdl2Java 给指定全名空间设置包名

Posted 流易

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Maven CXF wsdl2Java 给指定全名空间设置包名相关的知识,希望对你有一定的参考价值。

 

<plugin>
    <groupId>org.apache.cxf</groupId>
    <artifactId>cxf-codegen-plugin</artifactId>
    <version>3.2.4</version>
    <executions>
        <execution>
            <id>generate-sources-w2j</id>
            <phase>generate-sources</phase>
            <configuration>
                <sourceRoot>src/main/java</sourceRoot>
                <wsdlOptions>
                    <wsdlOption>
                        <wsdl>${basedir}srcmain
esourceswsdl20180628-OnePoint.svc-D11V2-single.wsdl</wsdl>
                        <extendedSoapHeaders>true</extendedSoapHeaders>
                        <autoNameResolution>true</autoNameResolution>
                        <bindingFiles>
                            <bindingFile>${basedir}srcmain
esourceswsdljaxb-bindings.xml</bindingFile>
                        </bindingFiles>
                        <extraargs>
                            <extraarg>-p</extraarg>
                            <extraarg>http://schemas.microsoft.com/2003/10/Serialization/=wsclient.mystifly.com.microsoft.schemas._2003._10.serialization</extraarg>
                            <extraarg>-p</extraarg>
                            <extraarg>http://schemas.microsoft.com/2003/10/Serialization/Arrays=wsclient.mystifly.com.microsoft.schemas._2003._10.serialization.arrays</extraarg><extraarg>-p</extraarg>
                            <extraarg>Mystifly.OnePoint=wsclient.mystifly.onepoint.mystifly</extraarg>
                            <extraarg>-p</extraarg>
                            <extraarg>Mystifly.OnePoint.OnePointEntities=wsclient.mystifly.onepointentities.onepoint.mystifly</extraarg>
                            <extraarg>-p</extraarg>
                            <extraarg>http://schemas.datacontract.org/2004/07/Mystifly.OnePoint=wsclient.mystifly.org.datacontract.schemas._2004._07.mystifly</extraarg><extraarg>-p</extraarg>
                            <extraarg>http://schemas.datacontract.org/2004/07/Mystifly.OnePoint.AirRules1_1=wsclient.mystifly.org.datacontract.schemas._2004._07.mystifly_onepoint</extraarg>
                        </extraargs>
                    </wsdlOption>
                </wsdlOptions>
            </configuration>
            <goals>
                <goal>wsdl2java</goal>
            </goals>
        </execution>
    </executions>
</plugin> 

 

以上是关于Maven CXF wsdl2Java 给指定全名空间设置包名的主要内容,如果未能解决你的问题,请参考以下文章

使用CXF开发WebService客户端

怎么用cxf的wsdl2java解析wcf生成的wsdl

apache cxf wsdl2java命令

apache cxf wsdl2java命令

在maven中,CXF自动生成失败并显示“Duplicated option:frontend”?

apache CXF wsdl2java工具的使用