SAP HR的https开头webservice调用心得
来源:互联网 发布:北京软件开发工资水平 编辑:程序博客网 时间:2024/04/29 14:51
前提:
SAP HR提供给你webservice到wsdl文件
第一步:将wsdl文件转成java
下载axis2-1.6.2-bin
转到文件夹 \axis2-1.6.2\bin
cmd到\axis2-1.6.2\bin文件夹 执行
wsdl2java -uri 800_SI_HR_ORG_INService.wsdl
//wsdl2java -uri 800_SI_HR_PERSON_INService.wsdl
在bin文件夹中可以看到src代码
第二步:将代码拷入工程调用
将src拷入工程
写如下调用代码:
SI_HR_ORG_INServiceStub stub = new SI_HR_ORG_INServiceStub();
Authenticator authenticator = new Authenticator();
authenticator.setAuthSchemes(authScheme);
authenticator.setUsername(Conf.getValue("hr_user"));
authenticator.setPassword(Conf.getValue("hr_password"));
// authenticator.setHost("HOST");
// authenticator.setDomain("DOMAIN");
// authenticator.setPort(443);
authenticator.setAllowedRetry(true);
authenticator.setPreemptiveAuthentication(true);
Options options = stub._getServiceClient().getOptions();
options.setProperty(HTTPConstants.AUTHENTICATE, authenticator);
options.setProperty(
org.apache.axis2.transport.http.HTTPConstants.CHUNKED,
Boolean.FALSE);
options.setProperty(HTTPConstants.CHAR_SET_ENCODING,"utf-8");
options.setTransportInProtocol("https");
options.setProperty(HTTPConstants.SO_TIMEOUT, 300000);
// options.setTo(new
// EndpointReference("https://abc.def.com/EWS/Exchange.asmx"));
stub._getServiceClient().setOptions(options);
//TODO 调用具体方法
stub.方法名();
- SAP HR的https开头webservice调用心得
- SAP HR的使用心得
- 关于调用webservice的心得
- SAP&Java WebService(二) ----ABAP调用SAP生成的WebService
- SAP&Java WebService(三) ----JAVA调用SAP生成的WebService
- Python调用基于https协议的WebService
- 调用https双向认证的webservice
- Python调用基于https协议的WebService
- java客户端调用 https 的webservice
- java调用https的webservice,https的wsdl
- cxf webservice 调用 https
- 使用ASP调用WebService的一点心得
- SAP的一些HR函数
- SAP的一些HR函数
- SAP的一些HR函数
- SAP的一些HR函数
- Js 调用 WebService心得
- HTTPS开头的网站都打不开
- GNU Radio message
- 人民币国际化推进债市双向开放
- avalon指令和js函数简单介绍
- 内存池的实现(二)
- LibSVM学习(五)——分界线的输出
- SAP HR的https开头webservice调用心得
- maven 多模块项目
- Eclipse 使用技巧
- Linux下编译安装Apache httpd 2.4
- LibSVM学习(六)——easy.py和grid.py的使用
- [组合转载]Tomcat Server文件配置
- java总结--内部类(一)
- $_SERVER['PHP_SELF']、$_SERVER['SCRIPT_NAME'] 与 $_SERVER['REQUEST_URI']区别
- typedef在C和C++中的区别