如何从LotusScript代理调用SOAP 1.2 Web服务?

编程入门 行业动态 更新时间:2024-10-28 13:17:04
本文介绍了如何从LotusScript代理调用SOAP 1.2 Web服务?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在Windows Server上使用Lotus Domino 9

I'm using a Lotus Domino 9 on a windows Server

我必须调用不再维护的 Soap 1.2 网络服务

I must call a Soap 1.2 web service that is not maintained anymore

Lotus Web服务使用者仅接受 Soap 1.1 Web服务,因此我无法使用此出色功能来绑定我的Web服务.

The Lotus Web service consumers only accepts Soap 1.1 web services, So I cannot use this nice feature to bind my web services.

是否可以从我的 LotusScript 代理调用 Soap 1.2 Web服务,如果可以,需要执行哪些步骤?

Is it possible to call a Soap 1.2 web service from my LotusScript agent and if yes, what are the needed steps ?

推荐答案

最后,我找到了使用XMLHTTP对象的解决方案

Finally I found a solution using the XMLHTTP object

Sub Initialize Dim xmlhttp As Variant dim DOMDocument As Variant Dim soapEnvelope As String Dim webService As String dim username As String Dim password As String Dim strxml As String Set xmlhttp = CreateObject("Msxml2.XMLHTTP") Set DOMDocument = CreateObject("MSXML2.DOMDocument") webService = "server/path/service" username = "user1" password = "123456" soapEnvelope ={<soap:Envelope xmlns:soap="www.w3/2003/05/soap-envelope" xmlns:doc="checkYourOwnEnvelopeDetails">} soapEnvelope =soapEnvelope & {<soap:Header/>} soapEnvelope =soapEnvelope & {<soap:Body>} ' ...use SoapUI to know the exact envelop structure soapEnvelope =soapEnvelope & {</soap:Body>} soapEnvelope =soapEnvelope & {</soap:Envelope>} DOMDocument.loadXML (soapEnvelope) Call xmlhttp.open("POST", webService, False,username,password) Call xmlhttp.setRequestHeader("Content-Type", "application/soap+xml;charset=UTF-8") Call xmlhttp.setRequestHeader("Username", username) Call xmlhttp.setRequestHeader("Password", password) ' again, use SoapUI to discover the exact name of the action Call xmlhttp.setRequestHeader("SOAPAction", "urn:getListAll") Call xmlhttp.send(DOMDocument.xml) strxml = xmlhttp.responseText ... End Sub

更多推荐

如何从LotusScript代理调用SOAP 1.2 Web服务?

本文发布于:2023-11-14 18:50:05,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1588258.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:SOAP   LotusScript   Web

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!