1
假设我有以下2种Web服务代码,我想我可以做以下
Jax-WS - 当实现Web服务时,你可以调用另一个Web服务,比如调用任何pojo?
@WebService
public class WS1 {
@WebMethod
public String hello() {
WS2 ws2 = new WS2();
ws2.method2();
}
@WebService
public class WS2 {
@WebMethod
public String method2() {
//implementation of method2.
}
我测试和它的工作。现在的问题是:是否有任何副作用或无法预料的后果,我不知道如果我这样做?我可以从服务器端调用第二个Web服务对象吗?