Web services 如何从LotusScript代理调用SOAP1.2Web服务?

Web services 如何从LotusScript代理调用SOAP1.2Web服务?,web-services,soap,lotus-notes,lotus-domino,lotusscript,Web Services,Soap,Lotus Notes,Lotus Domino,Lotusscript,我正在windows服务器上使用LotusDomino9 我必须调用不再维护的SOAP1.2web服务 LotusWeb服务消费者只接受SOAP1.1Web服务,因此我无法使用这个好功能绑定我的Web服务 是否可以从我的LotusScript代理调用SOAP1.2web服务?如果可以,需要执行哪些步骤?最后,我找到了一个使用XMLHTTP对象的解决方案 Sub Initialize Dim xmlhttp As Variant dim DOMDocument As Variant

我正在windows服务器上使用LotusDomino9

我必须调用不再维护的SOAP1.2web服务

LotusWeb服务消费者只接受SOAP1.1Web服务,因此我无法使用这个好功能绑定我的Web服务


是否可以从我的LotusScript代理调用SOAP1.2web服务?如果可以,需要执行哪些步骤?

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

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 = "http://server/path/service"

    username = "user1"
    password = "123456"

    soapEnvelope ={<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:doc="http://checkYourOwnEnvelopeDetails.com">}
    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
子初始化
Dim xmlhttp作为变量
作为变体的文档
把信封改成字符串
Dim webService作为字符串
将用户名设置为字符串
将密码设置为字符串
将strxml设置为字符串
设置xmlhttp=CreateObject(“Msxml2.xmlhttp”)
设置DOMDocument=CreateObject(“MSXML2.DOMDocument”)
Web服务=”http://server/path/service"
username=“user1”
密码=“123456”
soapEnvelope={}
soapEnvelope=soapEnvelope&{}
soapEnvelope=soapEnvelope&{}
“…使用SoapUI了解确切的信封结构
soapEnvelope=soapEnvelope&{}
soapEnvelope=soapEnvelope&{}
DOMDocument.loadXML(soapEnvelope)
调用xmlhttp.open(“POST”、webService、False、用户名、密码)
调用xmlhttp.setRequestHeader(“内容类型”,“应用程序/soap+xml;字符集=UTF-8”)
调用xmlhttp.setRequestHeader(“用户名”,Username)
调用xmlhttp.setRequestHeader(“密码”,Password)
'再次使用SoapUI来发现操作的确切名称
调用xmlhttp.setRequestHeader(“SOAPAction”,“urn:getListAll”)
调用xmlhttp.send(DOMDocument.xml)
strxml=xmlhttp.responseText
...    
端接头

你读了吗?是的,我读了,但不幸的是,这并不能解决我的问题