webservice url=http://10.90.11.240:8081/ExceptionWebService.asmx?WSDL;

下载axis2组件,解压,进入bin目录,通过命令wsdl2java -uri http://10.90.11.240:8081/ExceptionWebService.asmx?WSDL -p com.zsp.proxy -s -o source

-uri 后面运行的是 你的wsdl地址, -p 是文件生成的包名 -o source生成的文件目录,在bin目录下。

把生成的代理类,拷贝到你的工程目录中,导入对应的包即可访问:

例如

POST /ExceptionWebService.asmx HTTP/1.1
Host: 10.90.11.240
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://tempuri.org/ApproveException" <?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ApproveException xmlns="http://tempuri.org/">
<eventName>string</eventName>
<description>string</description>
<occurTime>string</occurTime>
<livingPlace>string</livingPlace>
<eventLevel>一般 or 急件 or 紧急 or 特急</eventLevel>
<bussinessCategory>运销 or 管道 or 设备 or HSE or 经营 or 管理 or 工程 or 科技 or 信息 or 党群 or 其它</bussinessCategory>
<reporterId>string</reporterId>
<contact>string</contact>
<systemId>string</systemId>
<businessPK>string</businessPK>
<remark>string</remark>
<isRelease>boolean</isRelease>
<measures>string</measures>
</ApproveException>
</soap:Body>
</soap:Envelope>

访问时:

public class Test2 {

    public static void main(String[] args) throws RemoteException {
// TODO Auto-generated method stub
ExceptionServiceStub proxy = new ExceptionServiceStub(); ExceptionServiceStub.ApproveException exp = new ExceptionServiceStub.ApproveException();
exp.setContact("374378");
exp.setDescription("描述");
exp.setEventName("测试异常");
exp.setIsRelease(true);
exp.setLivingPlace("发生地点");
exp.setMeasures("47477474");
exp.setOccurTime("2019-09-09");
exp.setSystemId("xj_001");
exp.setRemark("备注");
exp.setEventLevel(EmergencyDegree.一般);
exp.setBussinessCategory(BusinessCategory.HSE);
exp.setBusinessPK("bpk");
exp.setReporterId("xxxx");
ApproveExceptionResponse res = proxy.approveException(exp);
System.out.println(res.getApproveExceptionResult());
} }

使用内部类的方式设置参数,很方便,这种方式和C#通过VS生成代理的操作方式基本一致。

客户端需要导入的包如下:

使用axis2访问webservice(webserivice基于.net平台实现)的更多相关文章

  1. 微信小程序访问webservice(wsdl)+ axis2发布服务端(Java)

    0.主要思路:使用axis2发布webservice服务端,微信小程序作为客户端访问.步骤如下: 1.服务端: 首先微信小程序仅支持访问https的url,且必须是已备案域名.因此前期的服务器端工作需 ...

  2. 使用axis2进行WebService的开发

    使用axis2进行WebService的开发 Apache Axis2 是 Apache Axis SOAP 项目的后继项目.此项目是 Web 服务核心引擎的重要改进,目标是成为 Web 服务和面向服 ...

  3. Java借助axis2发布WebService

    Webservice: 1.Xml: 2.WSDL: Web service描述语言(WSDL)就是这样一个基于XML(标准通用标记语言下的一个子集)的语言,用于描述Web service及其函数.参 ...

  4. 使用Axis2实现WebService的发布和调用

    一.Axis2的下载和安装 1.可从http://ws.apache.org/axis2/ 下载Axis2的最新版本:      可以下载如下三个zip包: axis2-1.7.3-bin.zip(用 ...

  5. WebService---Android中访问WebService接口的方法

     最近公司有个项目需要从Android平台访问WebService接口,实现向发布的函数传递对象.在网上找了一些资料,发现使用ksoap2可以调用WebService传递对象.   需要引入ksoap ...

  6. Android访问WebService的两种方法

    首先解释一下WebService:WebService是一种基于SOAP协议的远程调用标准.通过WebService可以将不同操作系统平台,不同语言.不同技术整合到一起.详细见:http://baik ...

  7. WebService学习之旅(七)Axis2发布WebService的几种方式

    前面几篇文章中简单的介绍了如何使用Axis2发布WebService及如何使用Axis2实现Web服务的客户端调用,本节將详细介绍Axis2发布WebService的几种方式. 一.使用aar包方式发 ...

  8. Axis2开发webservice详解

    Axis2开发webservice详解 标签: javawebserviceAxis2 2015-08-10 10:58 1827人阅读 评论(0) 收藏 举报  分类: JAVA(275)  服务器 ...

  9. 十九、.net core使用SoapCore开发webservice接口,以及使用HttpClientFactory动态访问webservice接口

    使用SoapCore实现在.net core平台下开发webservice:以及使用HttpClientFactory动态访问webservice. 首先,需要在包项目下面引用SoapCore: 然后 ...

随机推荐

  1. js小记 function 的 length 属性

    原文:js小记 function 的 length 属性 [1,2,3]., ,这个略懂js的都知道. 但是  eval.length,RegExp.length,"".toStr ...

  2. $.each()遍历Json对象

    1.遍历JavaScript数组对象: var json = [ //中括号起始 {"id":"1","tagName":"app ...

  3. Asp.Net MVC5入门学习系列④

    原文:Asp.Net MVC5入门学习系列④ 添加Model且简单的使用EF 对于EF(EntityFramework)不了解的朋友可以去百度文科或者在园子里搜一些简资源看下,假如和我一样知道EF的概 ...

  4. Java获取.properties配置文件某一项value根据key值

    public static String getProperty(String key){ InputStream in = PropertiesUtils.class.getResourceAsSt ...

  5. 【 D3.js 入门系列 --- 9.6 】 生产的包图

    我的个人博客是:www.ourd3js.com csdn博客为:blog.csdn.net/lzhlzz 转载请注明出处,谢谢. 打包图( Pack ).用于包括与被包括的关系,也表示各个对象的权重, ...

  6. OpenGL+VS2013+WIN7(64)组态

    1.下载windows在下面glut安装文件:http://www.opengl.org/resources/libraries/glut/glutdlls37beta.zip 2. 拆开发现五个文件 ...

  7. DDD分层架构之仓储

    DDD分层架构之仓储(层超类型基础篇) 前一篇介绍了仓储的基本概念,并谈了我对仓储的一些认识,本文将实现仓储的基本功能. 仓储代表聚合在内存中的集合,所以仓储的接口需要模拟得像一个集合.仓储中有很多操 ...

  8. PHP 15:异常

    原文:PHP 15:异常 看完了out_put_fns.php文件,让我们再看看db_fns.php文件.其代码非常简单,如下:    ?> 其作用是连接数据库,并返回一个数据库连接.在这里我们 ...

  9. SQL点滴27—性能分析之执行计划

    原文:SQL点滴27-性能分析之执行计划 一直想找一些关于SQL语句性能调试的权威参考,但是有参考未必就能够做好调试的工作.我深信实践中得到的经验是最珍贵的,书本知识只是一个引导.本篇来源于<I ...

  10. jquery无缝滚动效果实现

    demo如下: <!DOCTYPE html> <html lang="en"> <head> <meta charset="U ...