0

I have the following class

HelloWorld.java      - interface
HelloWorldImpl.java  - service implementation
HelloWorldPublisher  - publisher

in the directory,

C:\Users\ANSARI\Desktop\Lexicon\WorkSpaceLuna\WebServices\DocumentStyle\src\com\
farhan\ws

I tried to use the wsgen command from the command prompt in the manner shown below,

enter image description here

How can I resolve this error?

Farhan stands with Palestine
  • 13,890
  • 13
  • 58
  • 105

1 Answers1

0

It looks as if you are in the src directory (as indicated by the path \src\com\farhan\ws) and therefore the class file cannot be found (wsgen operates on the byte code, not on Java sources).

Change into the eclipse project directory

 cd \Users\ANSARI\Desktop\Lexicon\WorkSpaceLuna\WebServices\DocumentStyle

and execute the following command:

 wsgen -cp bin -keep -s src -d bin com.farhan.ws.HelloWorldImpl

The option -cp defines the classpath (the path where the class file for HelloWorldImpl can be found). The -s option specifies where to place the generated source files and -d specifies where to place the generated output files.

Note: I think that it is not necessary to generate artefacts using wsgen with the JAX-WS implementation which is part of the JDK. The necessary classes are generated on the fly. It should be possible to start your publisher without invoking wsgen (but I have not found a confirmation of this statement in the docs).

Dominik
  • 1,058
  • 8
  • 20