Menu:
- Requirement
- Development - Client Generation
- Development - Server Generation
- References
Requirement
- Apache Axis 2 1.5.6 (and above) 下载地址:http://archive.apache.org/dist/axis/axis2/java/core/1.6.1/axis2-1.6.1-bin.zip
- Apache Tomcat 6 (and above)
- Apache Ant 1.8.3 (and above)
- Java JDK 1.5 (and above)
- WSDL
Development - Client Generation
- in folder:Create a folder as clientSide under C:\
- in cmd:Now open a cmd
- in cmd:Change your path to C:\axis2-1.5.6\bin
- in cmd:Set your JAVA_HOME to your java SDK home (eg : set JAVA_HOME=c:\Program Files\Java\jdk1.6.0_33)
- in cmd:Enter: wsdl2java.bat -uri CBS-CustAcctListProfile-I-Concrete_HTTP.wsdl -u -o c:\clientSide
- in folder:The commend above will generate the client side java files under C:\clientSide
- in folder:Go to C:\clientSide in windows explorer and open the build.xml file
- in build.xml file:Change memoryMaximumSize="256m" memoryInitialSize="256m" to memoryMaximumSize="512m" memoryInitialSize="512m"
- in build.xml file:Change axis2.home
- in build.xml file:Change <jar destfile="${lib}/${name}-test-client.jar"> to <jar destfile="${lib}/appropriatename-client.jar">
- Appropriate
name depends on the service, example for CBS-CustAcctDetails-I
appropriate name for the jar would be cbs-CustAcctDetails-client.jar - in cmd:Open back the existing (or new cmd and set the java), point to the bin folder (eg : C:\apache\apache-ant-1.8.3\bin),enter : ant -f c:\clientSide\build.xml
- in folder:The client jar will be created at C:\clientSide\build\lib\
Development - Server Generation
- in folder:Create a folder serverSide under C:\
- in cmd:Now open cmd
- in cmd:Change your path to C:\axis2-1.5.6\bin
- in cmd:Set your JAVA_HOME to your java SDK home (eg : set JAVA_HOME=c:\Program Files\Java\jdk1.6.0_33)
- in folder:put your WSDL file into:C:\serverSide\build\classes\META-INF
- in cmd:Then enter: wsdl2java.bat -uri <filename.wsdl> -ss -sd -o c:\serverSide (note:filename need to change to your WSDL file name)
- in folder:This command will generate server side (service provider) java files under C:\serverSide.
- in folder:Go to C:\serverSide in windows explorer and open the build.xml file.
- in build.xml file:Change memoryMaximumSize="256m" memoryInitialSize="256m" to memoryMaximumSize="512m" memoryInitialSize="512m"
- in build.xml file:Change axis2.home
- in cmd:Open back the existing (or new cmd and set the java), enter : ant -f c:\serverSide\build.xml (OR:in cmd:Change your path to C:\axis2-1.5.6\bin,enter: ant )
- in folder:This will build the java files in C:\serverSide\build\lib\
References
- Axis-Generate Web service and client stub from wsdl v1.5.doc
- Axis-Generate Web service and client stub from wsdl v1.6.doc
转载自: Technical Repository
原文地址: https://conf-server.hitachi-ebworx.com/pages/viewpage.action?pageId=6848538
如有侵权,请联系作者删除
原文地址:https://www.cnblogs.com/ymjingSpace/p/10789645.html
时间: 2024-11-09 08:16:35