12.07.2015 Views

Anyframe CXF Plugin

Anyframe CXF Plugin

Anyframe CXF Plugin

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Simple FrontendJetty 혹은 Tomcat 서버 등의 WAS를 이용하여 웹 어플리케이션을 구동하고 서버 사이드의 서비스를 Web Services로 노출시키게 되는데, 이때 web.xml 파일에 Spring Configuration XML 파일을 org.springframework.web.context.ContextLoaderListener를 이용하여 등록시켜 줘야 한다. 다음은<strong>CXF</strong>Servlet과 ContextLoaderListener를 정의한 web.xml 의 일부이다.contextConfigLocationWEB-INF/context-movie-server.xmlorg.springframework.web.context.ContextLoaderListener<strong>CXF</strong>Servlet<strong>CXF</strong> Servletorg.apache.cxf.transport.servlet.<strong>CXF</strong>Servlet1<strong>CXF</strong>Servlet/*5.4.Client: Simple Frontend API 코드 사용Web Services에 접근하기 위한 클라이언트 작성 방식에는 2가지 방식이 지원된다. 이중 pache <strong>CXF</strong>에서 제공하는 Simple Frontend API 코드를 직접 이용한 클라이언트를 작성하여 Web Services에 접근해보도록 한다.5.4.1.Samples다음은 Apache <strong>CXF</strong>에서 제공하는 ClientProxyFactoryBean를 직접 이용하여 Web Services로 노출된Movie Service에 접근하는 예제이다.• Apache <strong>CXF</strong> ClientProxyFactoryBean 사용한 클라이언트다음은 Apache <strong>CXF</strong>에서 제공하는 ClientProxyFactoryBean 클래스를 사용하여 Web Services로 노출된 Movie Service에 접근하는 코드 작성 예이다.ClientProxyFactoryBean factory = new ClientProxyFactoryBean();factory.setServiceClass(MovieService.class);factory.setAddress("http://localhost:9002/Movie");40

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!