3
기본 웹 서비스가 생성되었습니다. 내 서버 클래스에 "status"라는 변수가 있고 SEI에 클라이언트가 호출하여 상태를 가져 오는 "getUpdate"메소드가 들어 있다고 가정 해 보겠습니다. SEI 메서드 "getUpdate"를 호출하기 위해 이것을 클라이언트 측에서 어떻게 코딩해야합니까?SEI (Service Endpoint Interface)
클라이언트 측에서 port.Update를 사용하면 어떤 서버 인스턴스를 참조 할 수 있습니까?
미리 감사드립니다.
SEI 클래스 :
package com.basic.ws;
import javax.jws.WebService;
@WebService(name = "Server_SEI", targetNamespace = "http://ws.basic.com/")
public interface Server_SEI {
public int sum(int x, int y);
public String getUpdate();
}
서버 클래스 : 당신은 당신이 그것을 소비 할 수 있도록 만든 것을 게시해야
package com.basic.ws;
import javax.jws.WebService;
@WebService(targetNamespace = "http://ws.basic.com/", endpointInterface = "com.basic.ws.Server_SEI", portName = "ServerPort", serviceName = "ServerService")
public class Server implements Server_SEI{
String status = "OK";
public void setTrafficStatus(String status){
this.status = status;
}
public String getUpdate(){
return status;
}
}