2
For example, I have 3 classes in my Web Service:
1 - A SEI (the web service interface):
package calc;
import javax.jws.WebService;
import javax.jws.WebMethod;
import javax.jws.soap.SOAPBinding;
import javax.jws.soap.SOAPBinding.Style;
@WebService
@SOAPBinding(style = Style.RPC)
public interface CalculatorServer {
@WebMethod float sum(float num1, float num2);
@WebMethod float subtraction(float num1, float num2);
@WebMethod float multiplication(float num1, float num2);
@WebMethod float division(float num1, float num2);
}
2 - A SIB (the implementation of the Interface):
package calc;
import java.util.Date;
import javax.jws.WebService;
@WebService(endpointInterface = "calc.CalculatorServer")
public class CalculatorServerImpl implements CalculadoraServer {
public float sum(float num1, float num2) {
return num1 + num2;
}
public float subtraction(float num1, float num2) {
return num1 - num2;
}
...
}
3 - And the class responsible for publishing it:
package calc;
import javax.xml.ws.Endpoint;
public class CalculadoraServerPublisher {
public static void main(String[] args)
{
Endpoint.publish("http://127.0.0.1:9876/calc",
new CalculadoraServerImpl());
}
}
If I run third class and access the address:
http://127.0.0.1:9876/calc?wsdl
I will see the WSDL of my Web Service. Hence the question: if I can access it, it is physically allocated somewhere on my computer, but... WHERE? I tried to use all the Windows search tools I know (I use Windows 8.1) and none of them could find it. Where is he, after all?