关于使用axis调用webservice接口方法
1、概述:
我们有时候会调用webserviec接口,我们向接口发送请求参数,从接口接收返回值。
2、形式:
package client; import org.apache.axis.client.Call;
import org.apache.axis.client.Service; public class TestClient { public static void main(String[] args) throws Exception { // 指出service所在URL String endpoint = "http://xxxxxxxxxxxxxx/webservice/services/xxxxxxxxx"; // 创建一个服务(service)调用(call) Service service = new Service(); Call call = (Call) service.createCall();// 通过service创建call对象 // 设置service所在URL call.setTargetEndpointAddress(new java.net.URL(endpoint)); // 方法名(processService)与MyService.java方法名保持一致 call.setOperationName("getName"); // Object 数组封装了参数,参数为"This is Test!",调用processService(String arg) String ret = (String) call.invoke(new Object[] { "xxxxx" }); System.out.println(ret); } }
关于使用axis调用webservice接口方法的更多相关文章
- Java调用webservice接口方法
java调用webservice接口 webservice的 发布一般都是使用WSDL(web service descriptive langu ...
- Java调用webservice接口方法(SOAP message、xfire、axis)
webservice的 发布一般都是使用WSDL(web service descriptive language)文件的样式来发布的,在WSDL文件里面,包含这个webservice暴露在外面可供使 ...
- 利用axis调用webservice接口
一.首先把wsdl文件放入eclipse中某个项目中的src目录下 二.右键弹出webservice,然后点击webservice菜单,选中genernator client ,选择axis生成Jav ...
- 使用axis调用webservice接口
以前使用webservice服务都很简单,就是根据提供的wsdl接口地址,通过eclipse或者idea自动生成webservice client包,然后直接调用就可以了.这次业务提供的wsdl是需要 ...
- Java调用WebService方法总结(4)--Axis调用WebService
Axis是比较常用的WebService框架,该项目在2006实现了最终版,后面就没有更新了.文中demo所使用到的软件版本:Java 1.8.0_191.Axis 1.4. 1.准备 参考Java调 ...
- Java通过axis调用WebService
上午头给了我一个任务,让我对接别的公司的webservice接口,各种百度,看的头晕脑花的,终于通了,记录一下吧. jar包奉上,http://pan.baidu.com/s/1jSchC 包含:ax ...
- (转)Java通过axis调用WebService
转自:http://blog.csdn.net/wanglha/article/details/49679825 转载地址:http://www.linuxidc.com/Linux/2015-06/ ...
- 原生java调用webservice的方法,不用生成客户端代码
原生java调用webservice的方法,不用生成客户端代码 2015年10月29日 16:46:59 阅读数:1455 <span style="font-family: Aria ...
- 使用axis调用WebService服务端
由于项目中要调用其他公司的接口,研究了下axis调用webService这种方式,现将代码贴出,以备以后查阅: package com.xbq; import javax.xml.namespace. ...
随机推荐
- ASP.NET-FineUI开发实践-10
嵌套Grid,光棍月大放送,不藏着掖着.实在写的不好,没脸藏啊~只考虑显示排序修改什么的都不管! 话说三石官网加实例了,http://fineui.com/demo/#/demo/grid/grid_ ...
- MVC的Model层中的一些便签
由于自己重新接触MVC,所以把Model层里的一些标签给记录下来,方便自己的使用. 这些是自己目前试用过的一些,在以后的工作中我会接着补充进去新的内容
- zookeeper笔记
zookeeper用于分布式配置管理,读写锁等等..后续补充.
- js动态新增组合Input标签
var x = 1; function addlink() { var linkdiv = document.getElementById("add1_0"); if (linkd ...
- osgi与webservice
osgi简介: http://osgia.com/ http://blog.csdn.net/xiaokui008/article/details/9662933 http://wdhdd889.it ...
- tribonacci
Everybody knows Fibonacci numbers, now we are talking about the Tribonacci numbers: T[0] = T[1] = T[ ...
- UVa12304
基础题,注意精度和旋转方向. #include <iostream> #include <math.h> #include <vector> #include &l ...
- canvas 绘制矩形
XXX(x,y,width,height) x矩形左上角x坐标 y矩形左上角y坐标 ...
- cocos2d-x 工程目录结构说明
下载最新的cocos2d-x,解压完之后呈现出如下的目录结构: cocos2dx:框架核心目录,里面是存放了2dx引擎的核心代码. CocosDenshion:各个平台的音效实现. document: ...
- part3
我就不刁旭概念什么的问题了哈~直接进入工作中所通用的一些有关object的方法和属性 1).for/in 属性的遍历~他遍历的对象没有特定的顺序,而且只能枚举出所有用户自定义的属性,不能枚举出某些预定 ...