WebServices客户端代码生成
方式一:
官网下载cxf运行包:http://cxf.apache.org/download.html
axis2:http://axis.apache.org/axis2/java/core/download.cgi
进入cxf的bin目录,cmd控制台运行:wsdl2java -d e:\ws\ http://219.139.241.227:8724/services/WMSPDAServices?wsdl

生成ws客户端代码。
附wsdl2java用法:
wsdl2java -p com -d D:\\src -all xx.wsdl
-p 指定其wsdl的命名空间,也就是要生成代码的包名:
-d 指定要产生代码所在目录
-client 生成客户端测试web service的代码
-server 生成服务器启动web service的代码
-impl 生成web service的实现代码
-ant 生成build.xml文件
-all 生成所有开始端点代码:types,service proxy,,service interface, server mainline, client mainline, implementation object, and an Ant build.xml file.
方式二:
maven项目pom.xml文件,配置以下插件:
<plugin>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-codegen-plugin</artifactId>
<version>2.7.3</version>
<executions>
<execution>
<id>generate-sources</id>
<phase>generate-sources</phase>
<configuration>
<sourceRoot>E:\workspaces\IdeaProjects\orderCenter\ordercenter-parent\ordercenter-job\src\main\java\com\ehaoyao\jobcenter\order\webservices\jyzx</sourceRoot>
<wsdlOptions>
<wsdlOption>
<wsdl>http://****:***/services/WMSPDAServices?wsdl</wsdl>
</wsdlOption>
</wsdlOptions>
</configuration>
<goals>
<goal>wsdl2java</goal>
</goals>
</execution>
</executions>
</plugin> clean install 即可生成ws客户端代码。 调用测试:


接口存在问题。
WebServices客户端代码生成的更多相关文章
- JAX_WS 2.2 规范的webservices客户端实现(Axis2,Cxf)
为了对接之前老版本的接口,折腾了好几个小时. 主要是目前我的程序采用的是axis2的jax_rpc方式发布webservices服务,用这种服务的客户端,去调用老版本的jax_ws 2.2的接口,会报 ...
- wsdl客户端代码生成的方法
在jdk的bin目录下有一个wsimport.exe的工具,使用该工具命令生产java客户端代码: 命令如下: wsimport -keep -d d:\ -s d:\src -p com.map ...
- jdk1.6 webService 客户端代码生成和测试
参数:测试webService的地址:http://10.113.11.1:9090/enocpService/buildingEngService?wsdl 1,eclipse中新建一个项目, 2, ...
- webservice发布服务:CXF及客户端调用
2.CXF:(与spring整合) CXF相对来说操作没有AXIS繁琐 1.导入spring的jar包和cxf的jar包 2.在spring的核心配置文件中配置发布的接口类 <?xml vers ...
- axis2_1.6.2之构建web端和客户端 .
参考资料: http://blog.csdn.net/apei830/article/details/5448897 axis2的官网 http://axis.apache.org/axis2/jav ...
- Android客户端与数据库交互数据的简单学习
Ø 数据库整理方案如下: 一.Android+ webservices+SQLServer : 通过webservices客户端向指定服务器发送请求,服务器响应返回指定格式的数据,如json或者x ...
- Idea14 生成webservices
一直为idea生成soap协议的webservices而纠结,当初做axis2的时候,用的是eclipse,用它的插件来生成.这次做短信平台,决定要换一下,因为eclipse用axis2生成的接口,会 ...
- .Net框架与框架类库-转
http://blog.csdn.net/rrrfff/article/details/6686493 .NET Framework 具有两个主要组件:公共语言运行库和 .NET Framework类 ...
- Webservice开发概念
一.Web Service基本概念 Web Service由两部分组成 SOAP--Web Service之间的基本通信协议. WSDL--Web Service描述语言,它定义了Web Servic ...
随机推荐
- 【Android Developers Training】 87. 序言:同步到云
注:本文翻译自Google官方的Android Developers Training文档,译者技术一般,由于喜爱安卓而产生了翻译的念头,纯属个人兴趣爱好. 原文链接:http://developer ...
- windows上将代码上传到Github
Repository name: 仓库名称 Description(可选): 仓库描述介绍 Public, Private : 仓库权限(公开共享,私有或指定合作者) Initialize this ...
- ajax同步请求JS代码
ajax同步请求JS代码 <script type="text/javascript"> var txt = document.getElementById('txt' ...
- SVN仓库迁移到Git遇到的两个问题和解决办法
OS: CentOS 7.0 准备: git svn git-svn sudo yum install git sudo yum install subversion sudo yum install ...
- phpcmsV9常用标签
头部: <title>{if isset($SEO['title']) && !empty($SEO['title'])}{$SEO['title']}{/if}{$SEO ...
- Tornado+MySQL模拟SQL注入
实验环境: python 3.6 + Tornado 4.5 + MySQL 5.7 实验目的: 简单模拟SQL注入,实现非法用户的成功登录 一.搭建环境 1.服务端的tornado主程序app.py ...
- webpack3中文版使用参考文档--全面解析webpack.config.js
Webpack目前官方发布的最新版本是3.1.0,相对于2.0的怎么本,在语法上没有变动,只是新增了功能.使用webpack,需要事先安装node.js,并对node.js生态有一些基本的了解,比如( ...
- SQl server 2012安装问题 error code 0x858C001b 解决方法
英文版系统安装中文版sql server的缘故,改安装英文版即可.
- JAVA - 深入JAVA 虚拟机 2
类的两种类型的类加载器 -Java虚拟机自带的加载器 根类加载器(Bootstrap): 使用C++编写,programer can not abtain this class. 扩展类加载器(Ext ...
- English - Mosquitos
Smith's house is full of mosquitos. Every night they bite him. He can not sleep because the mosquito ...