我尝试在项目中导入远程Web服务。 我正在使用gvnix并发出命令
remote service import ws --wsdl http://www.restfulwebservices.net/wcf/UNSPSCService.svc?wsdl --class ~.services.UNSPSC
我有这个回应
Updated SRC_MAIN_JAVA\com\springsource\petclinic\services\UNSPSC.java
Updated ROOT\pom.xml [skipped dependency org.apache.cxf:cxf-rt-frontend- jaxws:${cxf.version}; skipped dependency org.apache.cxf:cxf-rt-transports-http
:${cxf.version}; added dependency org.hibernate.javax.persistence:hibernate- jpa-2.0-api:1.0.1.Final; skipped dependency org.springframework:spring-tx:
${spring.version}; added plugin org.apache.cxf:cxf-codegen- plugin:${cxf.version}]
Updated ROOT\pom.xml
Generating sources ...
Generating sources error !
Undo manage SRC_MAIN_WEBAPP\WEB-INF\i18n\application.properties
Undo manage ROOT\pom.xml
Undo manage SRC_MAIN_WEBAPP\WEB-INF\i18n\application.properties
Undo manage ROOT\pom.xml
Undo manage SRC_MAIN_JAVA\com\springsource\petclinic\services\UNSPSC.java
Undo manage SRC_MAIN_WEBAPP\WEB-INF\spring\webmvc-config.xml
Error generating web service sources
任何帮助!!!!
答案 0 :(得分:0)
我尝试这些命令并为我工作:
roo-gvNIX> script --file clinic.roo
roo-gvNIX> remote service import ws --wsdl http://www.restfulwebservices.net/wcf/UNSPSCService.svc?wsdl --class ~.services.UNSPSC
但我对跟踪有一点不同:
Updated ROOT/pom.xml
Generating sources ...
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building petclinic 0.1.0.BUILD-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] n.Visit roo-gvNIX>
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ petclinic ---
[INFO] n.Visit roo-gvNIX>
[INFO] --- cxf-codegen-plugin:2.7.3:wsdl2java (UNSPSCService) @ petclinic ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSvNIX>
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 17.151s
[INFO] Finished at: Wed Sep 23 13:24:27 CEST 2015
[INFO] Final Memory: 15M/342M
[INFO] ------------------------------------------------------------------------
Created SRC_MAIN_JAVA/com/springsource/petclinic/services/UNSPSC_Roo_GvNix_WebServiceProxy.aj
gvNIX使用 cxf-codegen-plugin maven插件从 WDSL 生成源代码。因此,系统PATH
上必须可以访问 maven 可执行文件。确保您可以从系统shell执行mvn
命令。