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服務對象嗎?