Answer the question
In order to leave comments, you need to log in
How to generate two clients from WSDLs in such a way that both clients have the same set of folders?
I have two services: Service_1 and Service_2:
First Service:
public class HelloWorldPublisherByServer1 {
public static void main(String[] args) {
Endpoint.publish("http://localhost:9999/ws/hello", new HelloWorldImplByService1());
}
}
public class HelloWorldPublisherByServer2 {
public static void main(String[] args) {
Endpoint.publish("http://localhost:9992/ws/hello", new HelloWorldImplByService2());
}
}
@WebService(endpointInterface = "com.mkyong.ws.first.HelloWorldService1")
public class HelloWorldImplByService1 implements HelloWorldService1 {
@Override
public String getHelloWorldAsStringByService1(String name) throws MBFault {
return "111 Hello World JAX-WS " + name;
}
}
@WebService(endpointInterface = "com.mkyong.ws.second.HelloWorldService2")
public class HelloWorldImplByService2 implements HelloWorldService2 {
@Override
public String getHelloWorldAsStringByService2(String name) throws MBFault {
return "222 Hello World JAX-WS " + name;
}
}
@WebService
@SOAPBinding(style = Style.DOCUMENT, use=Use.LITERAL)
public interface HelloWorldService1 {
@WebMethod String getHelloWorldAsStringByService1(String name) throws MBFault;
}
@WebFault(name = "MBFault", targetNamespace = "http://fault.ws.mkyong.com/")
public class MBFault extends Exception {
private String detail;
public MBFault(String message, String detail) {
super(message);
this.detail = detail;
}
public MBFault(String message, String detail, Throwable cause) {
super(message, cause);
this.detail = detail;
}
public String getDetail() {
return detail;
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question