主要内容:

  记录关于Axis2的使用,通过WSDL文件生成Web service的客户端和服务器端的过程.

目录:

  • Requirement(必备工具)
  • Development - Client Generation(生成客户端)
  • Development - Server Generation(生成服务器端)

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(生成客户端)

  1. in folder:Create a folder as clientSide under C:\
  2. in cmd:Now open a cmd
  3. in cmd:Change your path to C:\axis2-1.5.6\bin
  4. in cmd:Set your JAVA_HOME to your java SDK home (eg : set JAVA_HOME=c:\Program Files\Java\jdk1.6.0_33)
  5. in cmd:Enter: wsdl2java.bat -uri CBS-CustAcctListProfile-I-Concrete_HTTP.wsdl -u -o c:\clientSide
  6. in folder:The commend above will generate the client side java files under C:\clientSide
  7. in folder:Go to C:\clientSide in windows explorer and open the build.xml file
  8. in build.xml file:Change memoryMaximumSize="256m" memoryInitialSize="256m" to memoryMaximumSize="512m" memoryInitialSize="512m"
  9. in build.xml file:Change axis2.home 
  10. in build.xml file:Change <jar destfile="${lib}/${name}-test-client.jar"> to <jar destfile="${lib}/appropriatename-client.jar">
  11. Appropriate
    name depends on the service, example for CBS-CustAcctDetails-I
    appropriate name for the jar would be cbs-CustAcctDetails-client.jar
  12. 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
  13. in folder:The client jar will be created at C:\clientSide\build\lib\

Development - Server Generation(生成服务器端)

  1. in folder:Create a folder serverSide under C:\
  2. in cmd:Now open cmd
  3. in cmd:Change your path to C:\axis2-1.5.6\bin
  4. in cmd:Set your JAVA_HOME to your java SDK home (eg : set JAVA_HOME=c:\Program Files\Java\jdk1.6.0_33)
  5. in folder:put your WSDL file into:C:\serverSide\build\classes\META-INF
  6. in cmd:Then enter: wsdl2java.bat -uri <filename.wsdl> -ss -sd -o c:\serverSide   (note:filename need to change to your WSDL file name)
  7. in folder:This command will generate server side (service provider) java files under C:\serverSide.
  8. in folder:Go to C:\serverSide in windows explorer and open the build.xml file.
  9. in build.xml file:Change memoryMaximumSize="256m" memoryInitialSize="256m" to memoryMaximumSize="512m" memoryInitialSize="512m"
  10. in build.xml file:Change axis2.home 
  11. 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 )
  12. in folder:This will build the java files in C:\serverSide\build\lib\

如有侵权,请联系作者删除

Axis2 Web Service Development & Deployment Guide(Axis2使用)的更多相关文章

  1. Web Service学习之一:Web Service原理

    一.定义 Web Service 不是框架也不是技术 而是解决远程调用.跨平台调用.跨语言调用问题的一种规范. 二.应用1.同一个公司新.旧系统的整合:比如CRM系统与OA.客服系统相互调用2.不同公 ...

  2. Web Service相关工具的配置

    近期在学习Web Service Testing,使用到了soapUI这个工具,但是在学习之前,需要搭建Web Service环境,其中有关数据库的连接问题花费了我好多时间,主要还是自己对于很多配置不 ...

  3. Error in WCF client consuming Axis 2 web service with WS-Security UsernameToken PasswordDigest authentication scheme

    13down votefavorite 6 I have a WCF client connecting to a Java based Axis2 web service (outside my c ...

  4. Eclipse利用Axis2插件构建Web Service并测试

    在学习Web Service的时候,从网上找到前辈的博客http://www.cnblogs.com/hexinlin/p/3358558.html,并依此文的方法按部就班:编写欲发布的java类He ...

  5. 新手Axis2 发布Web Service之路

    由于公司的需求,需要写几个银行接口写模拟器(Mock Server),此次接口需要发布成一个WEB Service. 一开始,我以为只要负责写接口的业务层就行了,具体的框架或是环境搭建可以不用管.在与 ...

  6. 2.3 Apache Axis2 快速学习手册之 ADB 构建Web Service

    使用ADB生成服务(根据ADB 命令将wsdl 文件还原成Java代码) 要使用Axis2数据绑定框架(ADB)生成和部署服务,请执行以下步骤. 通过在Axis2_HOME / samples / q ...

  7. 2.1 Apache Axis2 快速学习手册之 POJO 构建Web Service

    1. 准备:创建一个Maven Web App 项目 这里让我们使用Maven 模板创建一个Web App 项目 1. New------> Maven Project 2. 使用默认配置,点击 ...

  8. Java主流Web Service框架介绍:CXF和Axis2

    CXF和Axis2是目前java平台上最主流的两个框架,虽然两个项目都隶属ASF,但却是基于不同思想和风格实现的,因此也各有所长.   CXF:http://cxf.apache.org/ 是由过去的 ...

  9. Eclipse+tomcat+axis2进行web service部署

    用Eclipse+axis2+tomcat进行web service部署 2016-12-07 目录  1 安装JDK  1.1 下载JDK  1.2 安装和配置JDK  1.3 验证2 安装Ecli ...

随机推荐

  1. java如何集成支付宝移动快捷支付功能

    项目需要,需要在客户端集成支付宝接口.第一次集成,过程还是挺简单的,不过由于支付宝官方文档写的不够清晰,也是走了一些弯路,下面把过程写出来分享给大家.就研究了一下:因为使用支付宝接口,就需要到支付宝官 ...

  2. Gym 101201I Postman (贪心)

    题意:有个邮递员,要送信,每次最多带 m 封信,有 n 个地方要去送,每个地方有x 封要送,每次都到信全送完了,再回去,对于每个地方,可以送多次直到送够 x 封为止. 析:一个很简单的贪心,就是先送最 ...

  3. Kali linux切换语言为中文

    echo LANG="zh_CN.UTF-8" > /etc/default/locale

  4. Java学习总结——常见问题及解决方法

    CYTX项目开发中遇到的问题及解决方法 Android开发各类常见错误解决方案: 使用Android Studio遇到的问题及解决过程 登录注册部分问题及解决: 1.问题:"No targe ...

  5. Robotframework-Appium 之常用API(一)

    上一遍隨筆(https://www.cnblogs.com/cnkemi/p/9639809.html)用Python + Robotframework + Appium對Android app小試牛 ...

  6. linux下文件打包、压缩详解

    Linux平台下,有如下几种常见的压缩工具: ========================================================================= 工 具 ...

  7. [转载]MVC、MVP以及Model2(下)

    通过采用MVC模式,我们可以将可视化UI元素的呈现.UI处理逻辑和业务逻辑分别定义在View.Controller和Model中,但是对于三者之间的交互,MVC并没有进行严格的限制.最为典型的就是允许 ...

  8. 代码修改之后MSbuild编译不出最新的dll解决方法

    问题: 使用jenkins发布的时候,开发不断反馈自己修改的文件使用jenkins没有发布到测试环境.经过查证发现使用MSBUILD编译的时出现修改的文件编译出的日期不是最新日期,但是使用VS编译就不 ...

  9. hdu X问题 (中国剩余定理不互质)

    http://acm.hdu.edu.cn/showproblem.php?pid=1573 X问题 Time Limit: 1000/1000 MS (Java/Others)    Memory ...

  10. MaxScript通过.net发送邮件

    Fn SmtpSendMail argSmtpAddress argSenderAddress argSenderPassword argTargetAddress argTitle argMessa ...