如何首先为ApacheCXFWSDL创建maven项目
我想使用wsdl从头开始创建一个ApacheCXFMaven项目。我需要使用wsdl2java。我无法首先找到wsdl的原型。当我尝试 mvn原型:generate-Dfilter=org.apache.cxf.archetype: 我只看到这些。是否首先没有wsdl的原型?如果没有,一些人能推荐最有效的方法吗?谢谢 选择原型: 1:remote->org.apache.cxf.archetype:cxfjaxrs服务(简单的cxfjax-rswebap p服务(使用Spring配置) 2:remote->org.apache.cxf.archetype:cxf jaxws javafirst(为如何首先为ApacheCXFWSDL创建maven项目,maven,wsdl,cxf,wsdl2java,Maven,Wsdl,Cxf,Wsdl2java,我想使用wsdl从头开始创建一个ApacheCXFMaven项目。我需要使用wsdl2java。我无法首先找到wsdl的原型。当我尝试 mvn原型:generate-Dfilter=org.apache.cxf.archetype: 我只看到这些。是否首先没有wsdl的原型?如果没有,一些人能推荐最有效的方法吗?谢谢 选择原型: 1:remote->org.apache.cxf.archetype:cxfjaxrs服务(简单的cxfjax-rswebap p服务(使用Spring配置) 2:re
从Java代码开始开发Web服务)我总是为生成的wsdl创建子模块。Eclipse有一个路径问题——这个模块不需要编译很多次 对于客户:
<properties>
<wsdl.dir>${basedir}/src/main/resources/axis2</wsdl.dir>
<generateServerSide>false</generateServerSide>
<sourceRoot>${basedir}/target/generated/src/main/java</sourceRoot>
</properties>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-codegen-plugin</artifactId>
<version>${cxf.version}</version><!--$NO-MVN-MAN-VER$ -->
<executions>
<execution>
<id>generate-sources</id>
<phase>generate-sources</phase>
<configuration>
<sourceRoot>${sourceRoot}</sourceRoot>
<defaultOptions>
<bindingFiles>
<bindingFile>${wsdl.dir}/binding.xml</bindingFile>
</bindingFiles>
</defaultOptions>
<wsdlOptions>
<wsdlOption>
<wsdl>${wsdl.dir}/first.wsdl</wsdl>
<packagenames>
<packagename>com.company.gen.first</packagename>
</packagenames>
<extraargs>
<extraarg>-impl</extraarg>
<extraarg>-autoNameResolution</extraarg>
<extraarg>-wsdlLocation</extraarg>
<wsdlurl />
</extraargs>
</wsdlOption>
</wsdlOptions>
</configuration>
<goals>
<goal>wsdl2java</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin> <!-- for idea/eclipse -->
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>add-source</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>${sourceRoot}</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>
${basedir}/src/main/resources/axis2
假的
${basedir}/target/generated/src/main/java
org.apache.cxf
cxf-codegen插件
${cxf.version}
生成源
生成源
${sourceRoot}
${wsdl.dir}/binding.xml
${wsdl.dir}/first.wsdl
com.company.gen.first
-恳求
-自动命名解析
-wsdlLocation
wsdl2java
org.codehaus.mojo
构建助手maven插件
添加源
生成源
添加源
${sourceRoot}
对于服务器:
<execution>
<id>first</id>
<goals>
<goal>wsdl2code</goal>
</goals>
<configuration>
<generateServerSide>${generateServerSide}</generateServerSide>
<generateAllClasses>${generateServerSide}</generateAllClasses>
<generateServicesXml>${generateServerSide}</generateServicesXml>
<generateServerSideInterface>${generateServerSide}</generateServerSideInterface>
<wsdlFile>${wsdl.dir}/first.wsdl</wsdlFile>
<packageName>com.company.gen.first</packageName>
<unpackClasses>true</unpackClasses>
<syncMode>sync</syncMode>
<namespaceURIs>
<namespaceURI>
<uri>http://uri.company.com</uri>
<packageName>com.company.gen.first</packageName>
</namespaceURI>
</namespaceURIs>
</configuration>
</execution>
第一
wsdl2code
${generateServerSide}
${generateServerSide}
${generateServerSide}
${generateServerSide}
${wsdl.dir}/first.wsdl
com.company.gen.first
真的
同步
http://uri.company.com
com.company.gen.first
我有完全相同的问题。我的WSDL是通过编程生成的,我也使用wsdl2java。我需要一个合适的原型来使用。如果您能找到方便的解决方案,请与我们分享?