'Web Services'에 해당되는 글 1

  1. 2011.01.01 [IBM dWs] Java SE 6, Ecipse, Ant 를 이용한 간단한 웹 서비스

[IBM dWs] Java SE 6, Ecipse, Ant 를 이용한 간단한 웹 서비스

- Eclipse와 Java SE 6을 사용하여 독립형 웹 서비스 개발하기, Part 1: 웹 서비스 서버 애플리케이션
Create stand-alone Web services applications with Eclipse and Java SE 6, Part 1: The Web service server application
- Eclipse와 Java SE 6을 사용하여 독립형 웹 서비스 개발하기: Part 2: 웹 서비스 클라이언트 응용프로그램
Create stand-alone Web services applications with Eclipse and Java SE 6: Part 2: The Web service client application

- Java SE 6, Ecipse, Ant 를 이용해서 간단한 웹서비스를 구현하고 모니터링한다.

Java SE 6 JDK 설치
Eclipse JRE 설정

서버
Ant 를 실행시키면 com.myfirst.wsServer.jaxws 가 생김 서버를 실행시키고, Internal Web Browser 로 http://localhost:8080/wsServerExample?wsdl 을 입력하면 WSDL 을 볼 수 있다.

Eclipse 의 Web Services Explorer 를 이용해서 웹서비스를 테스트해 볼 수 있다.
Java EE Perspective 에서 Run - Launch the Web Services Explorer 을 선택하고
http://localhost:8080/wsServerExample?wsdl 를 호출해서 getGreeting 을 직접 호출해 본다.

클라이언트
wsimport 태스크를 실행하면 WSDL 를 참조해서 JAX-WS 관련 스텁?이 생성된다.
  • wsgen은 서비스 엔드 포인트 클래스를 읽고서 웹 서비스 전개 및 호출에 필요한 모든 아티팩트를 생성한다.
  • wsimport는 WSDL을 읽고서 웹 서비스 개발, 전개 및 호출에 필요한 모든 아티팩트를 생성한다.

- Eclipse TCP/IP Monitor 를 이용해서 모니터링을 할 수 있다.