0

我尝试在我的项目中导入远程 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

任何帮助!!!!

4

1 回答 1

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生成源代码。所以maven可执行文件必须在 system 上是可访问的PATH。确保您可以mvn从系统 shell 执行命令。

祝你好运!

于 2015-09-23T11:36:46.490 回答