访问https的SOAP接口

jar列表:
1.axis-1.3.2.jar
2.commons-discovery-0.2.jar
3.commons-logging-1.0.4.jar
4.jaxen-1.1.jar
5.jbossall-client-4.0.5.jar
6.jstl-1.1.2.jar

package com.*.webservice.service.impl;

import javax.xml.namespace.QName;

import org.apache.axis.client.Call;
import org.apache.axis.client.Service;


public class test {
public static void main(String[] args) {
// SIG UI组件的信任库文件位于 RM9000安装路径/pms/conf/control/ 下,命名为server.keystore
try {

// 信任库
System.setProperty("javax.net.ssl.trustStore", "e:/server.keystore");

String endpoint = "https://IP:8443/*/services/userWsService";
Call call = (Call) (new Service()).createCall();

call.setTargetEndpointAddress(new java.net.URL(endpoint));

call.setOperationName(new QName(endpoint, "addUser"));
call.setReturnType(org.apache.axis.encoding.XMLType.XSD_STRING);
call.addParameter("arg0", org.apache.axis.encoding.XMLType.XSD_STRING, javax.xml.rpc.ParameterMode.IN);

String returnValue = (String) call.invoke(new Object[] { "aaaaaaaa" });
System.out.print(returnValue);
} catch (Exception e) {
System.out.print(e);
}
}
}
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值