Unable to create a client stubs for a web service

2019-07-31 22:35发布

问题:

I am trying to learn web service development using JAX-WS.

I am trying out this tutorial.

I am able to create and run web service correctly and I got WSDL file when I hit the link http://localhost:8080/WS/Greeting?wsdl. However at step 5 of creating client stub using wsimport as follows:

CD %CLIENT_PROJECT_HOME%\src
wsimport –s . http://localhost:8080/WS/Greeting?wsdl

I am getting error as follows:

回答1:

Let's see this are the options and meanings:

-s: Specifies where to generate the SOURCES

-d: Specifies where to generate the CLASSES

-keep: Says to KEEP the sources

-p: Specifies a package

Now, you were using a "." to specify the source output, that may generate the problem. If your output folder is the current one, specify nothing.

Read here for wsimport documentation and for other tutorial for its usage use this.