본문 바로가기

웹서비스

Tomcat을 이용하여 SOAP 설정

#####################################
# Apache SOAP Server(Tomcat) #
#####################################

작성자 : 장형화(hhjang97@venus.uos.ac.kr)
작성일 : 2005. 09. 05
수정일 :

원본 :
설명 :

Tomcat을 이용하여 SOAP 처리를 수행한다.

################################# ################################# #################################

Apache SOAP Server
http://ws.apache.org/soap/

Download
http://ftp.apache-kr.org/ws/soap/
http://ftp.kaist.ac.kr/pub/Apache/ws/soap/

Apache SOAP Server Configure
http://ws.apache.org/soap/docs/guide/config.html

############################################### Install Apache SOAP Server (Tomcat 5.0)############################################## tomcat\shared\lib 에 xerces.jar, activation.jar, mail.jar, soap.jar 복사 1. soap.war을 이용하는 방법 soap.war 를 tomcat\webapps\에 복사 Tomcat restart 후 http://hostname:port/soap 으로 확인 2. Creating a new <Context> in Tomcat's server.xml file. %tomcat_home%/conf/server.xml 파일에 아래 정보 추가 <Host name="localhost" debug="0" appBase="webapps" ...> <!--Context path="/soap" docBase="path-to-apache-soap/webapps/soap" debug="1" reloadable="true"> </Context--> <Context path="/soap" docBase="soap" debug="1" reloadable="true"> </Context> <!-- webapps/soap 의 경우 docBase 는 soap로 한다. -->############################################### Client Application Depoly############################################## 1. xxx.java 코딩 및 컴파일 2. webapps/soap/WEB-INF/classes 에 복사 3. DepolymentDescriptor.xml 생성 ==================== DepolymentDescriptor.xml =================== <isd:service xmlns:isd="http://xml.apache.org/xml-soap/deployment" id="urn:onjavaserver"> <isd:provider type="java" scope="Application" methods="add subtract"> <isd:java class="test.soap.CalcService"/> </isd:provider> <isd:faultListener>org.apache.soap.server.DOMFaultListener</isd:faultListener> </isd:service> ==================== DepolymentDescriptor.xml =================== 4. Deploy ==================== depoly.bat =================== @echo off REM $Id: OpenLBSP start.bat,v 2.0 $ set DeploymentXml=D:\tomcat\soap_bin\DeploymentDescriptor.xml set JAVA=D:\java\j2sdk1.4.2\bin\java set CP= for %%i in (D:\tomcat\shared\lib\*.jar) do call cp.bat %%i set appcp=%CLASSPATH%;%CP%;%srcpath%;. %JAVA% -cp %appcp% org.apache.soap.server.ServiceManagerClient http://localhost:8080/soap/servlet/rpcrouter deploy %DeploymentXml% rem Pause ==================== depoly.bat ===================############################################### Reference##############################################http://www.onjava.com/lpt/a/1497 org.apache.soap.rpc.Parameter##################################