I am a beginner in the development of web services. I want to generate artifacts using wsgen.exe.
Here is my code:
package com.calc.ws;
import javax.jws.WebService;
@WebService
public class Calculator {
public int add(int a, int b) {
return (a + b);
}
public int sub(int a, int b) {
return (a - b);
}
}
The problem I'm facing is when I want to generate the artifacts from the command line with this command (one liner):
C:\Program Files\Java\jdk1.7.0_05\bin\wsgen
-cp "c:\users\mico\workspaceSOA\calcWS\src\com.calc.ws.Calculator"
-verbose
-d "C:\users\mico\classes\"
I get this error:
Missing SEI.
What is causing this?
Wsgen.exe is called in the following way:
WSGEN [options] <SEI>
It reads a web service endpoint implementation class (SEI) and generates all the required artifacts for web service deployment, and invocation.
In the command line you posted I only see options, you specified no SEI. And from here the message "Missing SEI" (i.e. you didn't provide a mandatory command line argument).
I don't know your exact setup but if I were to have this structure:
c:\temp
├───classpath
│ └───com
│ └───calc
│ └───ws
│ └───Calculator.class
└───generated
If I run (on one line):
wsgen -cp c:\temp\classpath
-keep
-s c:\temp\generated
com.calc.ws.Calculator
I will get my classes, but if I run just:
wsgen -cp c:\temp\classpath
-keep
-s c:\temp\generated
I will get:
Missing SEI