AXIS를 이용한 사용자 정의 개발 방법

Contents

1 WSDL 생성
2 WSDD 생성
3 deploy
4 undeploy



1 WSDL 생성 #

org.apache.axis.wsdl.Java2WSDL 툴 이용

ant build.xml 예제:
<target name="genWSDL" depends="javac">
  <java classname="org.apache.axis.wsdl.Java2WSDL" fork="true">
    <classpath refid="axisLib"></classpath>
    <arg line=" -o ${conf-dir}/${wsdl-filename}  -l ${webservice_url} -n ${targetNamespace} -p${webservcePackageName} ${targetNamespace} ${webserviceRemoteInterfaceName}"/>
  </java>
</target>



2 WSDD 생성 #

WSDD(Web Service Deployment Descriptor)라는 설정파일을 만들어야 함

AXIS서버에 WSDD파일 제출

org.apache.axis.wsdl.WSDL2Java 툴 이용

실행하면 스텁관련파일, deploy.wsdd, undeploy.wsdd 파일이 생성됨

ant build.xml 예제:
<target name="genWSDD" depends="genWSDL">
  <java classname="org.apache.axis.wsdl.WSDL2Java" fork="true">
    <classpath refid="axisLib"></classpath>
    <arg line=" -o clientsrc -d Application -s ${conf-dir}/${wsdl-filename}"/>
  </java>
</target>

생성된 test.wsdd 파일내용을 수정한다. ex)
<parameter name="className" value="test.TestImpl" />




3 deploy #

clientsrc(스텁소스가 생성되는 위치)를 컴파일

생성된 클래스파일을 WEB-INF/classes 로 복사

org.apache.axis.client.AdminClient 툴을 이용 디플로이

ant build.xml 예제:
<target name="deployWebService">
  <javac srcdir="clientsrc" destdir="${bin-dir}">
    <classpath refid="axisLib"></classpath>
  </javac>
    
  <copy todir="${deploy-dir}">
    <fileset dir="${bin-dir}">
      <include name="**/*.class"/>
    </fileset>
  </copy>
  
  <java classname="org.apache.axis.client.AdminClient" fork="true">
    <classpath refid="axisLib"></classpath>
    <arg line="-lhttp://localhost:8080/axis/services/AdminService clientsrc/webservice/math/deploy.wsdd"/>
  </java>
</target>






4 undeploy #

org.apache.axis.client.AdminClient 툴을 이용

ant build.xml 예제:
<target name="undeployWebService">
  <java classname="org.apache.axis.client.AdminClient" fork="true">
    <classpath refid="axisLib"></classpath>
    <arg line="-lhttp://localhost:8080/axis/services/AdminService clientsrc/webservice/math/undeploy.wsdd"/>
  </java>   
</target>

Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2008-08-27 17:31:20
Processing time 0.0097 sec