user4113731
user4113731

Reputation:

Wsgen is not generating

What is the problem with my command?

when I am writing this

wsgen -keep -verbose -cp . com.myyong.ws.ServerInfo

It gives error

Class not found: "com.mkyong.ws.ServerInfo"

And when I write this. Removing "." after "-cp"

wsgen -keep -verbose -cp  com.myyong.ws.ServerInfo

It gives

Missing SEI

Secondly what is "." here?

wsgen -keep -verbose -cp . com.myyong.ws.ServerInfo

I am following this example

Upvotes: 1

Views: 648

Answers (1)

VGR
VGR

Reputation: 44414

The documentation for wsgen states:

-cp path The location of the input class files.

So, the -cp option must be followed by whitespace, followed by a directory where your source package is located.

In most operating systems, including Windows, Linux, and OS X, the period (.) refers to the current directory.

If you specify -cp ., there must exist a directory named "com" under the current directory. More than that, there must be a file named com/myyong/ws/ServerInfo.class relative to the current directory.

wsgen always interprets the argument which follows -cp as a classpath. So if you omit the . argument, the next argument is interpreted as a classpath, and since there are no more arguments, the required SEI (service endpoint interface class) appears to be missing.

Upvotes: 2

Related Questions