Unable to import web service

108 Views Asked by At

I try to import a remote web service in my project. I am using gvnix and I give the command

    remote service import ws --wsdl http://www.restfulwebservices.net/wcf/UNSPSCService.svc?wsdl --class ~.services.UNSPSC

And I have this response

   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

Any help!!!!

1

There are 1 best solutions below

2
On

I try this commands and works for me:

roo-gvNIX> script --file clinic.roo
roo-gvNIX> remote service import ws --wsdl http://www.restfulwebservices.net/wcf/UNSPSCService.svc?wsdl --class ~.services.UNSPSC

But I have one difference about trace:

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 uses cxf-codegen-plugin maven plugin to generate source from a WDSL. So maven executable must be reachable on system PATH. Assure that you can execute mvn command from system shell.

Good luck!