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. centos6.5 x86_64安装oracle 11.2.0.3grid

     centos6.5 x86_64安装oracle 11.2.0.3grid 1.安装前的准备 工作 1.1.配置node1 1.1.1.配置虚拟机并安装centos 安装node1----- 1 ...

  2. 从头开始学JavaScript (十三)——Date类型

    说明:UTC:国际协调日期 GMT:格林尼治标准时间 一.date类型的创建 使用new操作符和Date()构造函数 var now=new Date(): 传入参数:Date.parse()和Dat ...

  3. 2440裸 Delay(); 和 while(!(rUTRSTAT0 &amp; 0x2)); 问题

    前两天写RTC中断 使用串行输出 它发现,该方案将while(!(rUTRSTAT0 & 0x2));走不出的情况.的 解决方法: main函数添加: U32 mpll_val = 0,con ...

  4. 乐趣与你rabbitMQ 源代码

    RabbitMQ API RabbitMQ Server它提供了丰富的http api. 对于列子 须要HTTP基本身份验证.默认的username/password为guest/guest. 这些返 ...

  5. FTP下载帮助类

    using System; using System.Collections.Generic; using System.Text; using System.IO; using System.Net ...

  6. Entity Framework查询原理

    Entity Framework查询原理 前言 Entity Framework的全称是ADO.NET Entity Framework,是微软开发的基于ADO.NET的ORM(Object/Rela ...

  7. Codeforces 113A-Grammar Lessons(实现)

    A. Grammar Lessons time limit per test 5 seconds memory limit per test 256 megabytes input standard ...

  8. 在windows下用C语言写socket通讯实例

    原文:在windows下用C语言写socket通讯实例 From:Microsoft Dev Center #undef UNICODE #define WIN32_LEAN_AND_MEAN #in ...

  9. weblogic启动报错--com.octetstring.vde.backend.BackendRoot

    错误现象: 使用bea用户启动weblogic时报错,错误信息如下: <2014-7-29 下午07时47分23秒 CST> <Notice> <Log Manageme ...

  10. UC编程:输入输出重定向(标准IO)

    [c] #include <stdio.h> #include <stdlib.h> int main() { FILE *fp; char szBuf[100]; /* 将屏 ...