FrontPage › 잠재력을끌어올리는10일플랜-마지막몰입-짐퀵-202104 › ejb › Useful Software › 운영프로세스관점 › JWSDP이용한웹서비스클라이언트작성
1 stub 생성 #
wscompile.sh 파일을 실행하여 정적스텁객체의 소스 or 클래스를 생성
이때 wscompile.sh 파일을 WSDL의 url을 가지고 있는 설정파일(client-config.xml) 필요
2 생성된 클래스 이용 애플리케이션 작성(소스 예) #
예)
public class TestClient { public static void main(String[] args) { try{ test.ws.Webservice_Impl ws = new test.ws.Webservice_Impl(); test.ws.TestIF test = (TestIF)ws.getTestIFPort(); double value = test.myMethod("abc", "def"); System.out.println(value); } catch(Exception e){ System.out.println(e); } } }