봄 웹 서비스를 (사랑의 CXF를) 선언의 simplifed 방법이있다.
<!-- Loading CXF modules -->
<import resource="classpath:META-INF/cxf/cxf.xml" />
<import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
<import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
을 그리고 마지막으로 당신의 WebService를 구현을 선언한다 : 당신의 applicationContext.xml
추가 그런 다음 schemaLocation
에 루트 태그 (<beans>
)와
http://cxf.apache.org/core
http://cxf.apache.org/schemas/core.xsd
http://cxf.apache.org/jaxws
http://cxf.apache.org/schemas/jaxws.xsd
에 xmlns:jaxws="http://cxf.apache.org/jaxws"
추가에
<jaxws:endpoint id="MyWebService" implementor="#MyWebServiceImpl"
address="/myWebServiceAddress" />
여기에서 #MyWebServiceImpl
은 사용자 bean의 ID입니다. 다른 빈 의존성을 빈에 자유롭게 삽입 할 수 있습니다.
그러면 웹 서비스는 http://yourhost/cxfuri/myWebServiceAddress
(여기서 cxfuri는 CXF 서블릿의 매핑 임)
을 통해 액세스 할 수 있습니다.