package demo.hw.server;
import org.apache.hello_world_soap_http.Greeter;
@javax.jws.WebService(portName = "SoapPort", serviceName = "SOAPService",
targetNamespace = "http://apache.org/hello_world_soap_http",
endpointInterface = "org.apache.hello_world_soap_http.Greeter")
public class GreeterImpl implements Greeter {
public String greetMe(String me) {
System.out.println("Executing operation greetMe"); System.out.println("Message received: " + me + "\n"); return "Hello " + me;
}
public void greetMeOneWay(String me) {
System.out.println("Executing operation greetMeOneWay\n"); System.out.println("Hello there " + me);
}
public String sayHi() {
System.out.println("Executing operation sayHi\n"); return "Bonjour";
}
public void pingMe() throws PingMeFault {
FaultDetail faultDetail = new FaultDetail(); faultDetail.setMajor((short)2); faultDetail.setMinor((short)1); System.out.println("Executing operation pingMe, throwing PingMeFault exception\n"); throw new PingMeFault("PingMeFault raised by server", faultDetail);
}
}
package demo.hw.server;
import org.apache.hello_world_soap_http.Greeter;
@javax.jws.WebService(portName = "SoapPort", serviceName = "SOAPService",
targetNamespace = "http://apache.org/hello_world_soap_http",
endpointInterface = "org.apache.hello_world_soap_http.Greeter")
public class GreeterImpl implements Greeter {
public String greetMe(String me) {
System.out.println("Executing operation greetMe"); System.out.println("Message received: " + me + "\n"); return "Hello " + me;
}
public void greetMeOneWay(String me) {
System.out.println("Executing operation greetMeOneWay\n"); System.out.println("Hello there " + me);
}
public String sayHi() {
System.out.println("Executing operation sayHi\n"); return "Bonjour";
}
public void pingMe() throws PingMeFault {
FaultDetail faultDetail = new FaultDetail(); faultDetail.setMajor((short)2); faultDetail.setMinor((short)1); System.out.println("Executing operation pingMe, throwing PingMeFault exception\n"); throw new PingMeFault("PingMeFault raised by server", faultDetail);
}
}
Copy to Clipboard
Copied!
Toggle word wrap
Toggle overflow