Consulting

Results 1 to 2 of 2

Thread: Webservice return Encryption error

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    VBAX Newbie
    Joined
    Jan 2023
    Posts
    2
    Location

    Post Webservice return Encryption error

    Hello I use this macro, but returned message Encryption error. Can I help me? Thank you

    • Public Sub httplogin()
    • Dim result As String
    • Dim xmlDoc As Object, post As Object
    • Dim sEnv As String
    • Set xmlDoc = CreateObject("MSXML2.DOMDocument")
    • Dim HTTPRequest As WinHttp.WinHttpRequest
    • Set HTTPRequest = New WinHttp.WinHttpRequest
    • sEnv = sEnv & "<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/"">"
    • sEnv = "<?xml version=""1.0"" encoding=""utf-8""?>"
    • sEnv = sEnv & "<soap:Envelope xmlns:soap=""http://schemas.xmlsoap.org/soap/envelope/"">"
    • sEnv = sEnv & "<soap:Body>"
    • sEnv = sEnv & "<logUser xmlns=""http://www.webservice.com/Sws/"">"
    • sEnv = sEnv & "<LOGIN>user</LOGIN>"
    • sEnv = sEnv & "<PASSWORD>pass</PASSWORD>"
    • sEnv = sEnv & "</logUser>"
    • sEnv = sEnv & "</soap:Body>"
    • sEnv = sEnv & "</soap:Envelope>"
    • With HTTPRequest
    • .Open "POST", "http://server.com/webservice.asmx?WSDL&op=logUser", False
    • .SetRequestHeader "Content-Type", "text/xml; charset=utf-8"
    • .SetRequestHeader "Upgrade-Insecure-Requests", "1"
    • .SetRequestHeader "User-Agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)"
    • .send sEnv
    • Debug.Print .responseText
    • End With
    • End Sub
    Last edited by Aussiebear; 01-10-2023 at 12:31 AM. Reason: Edited post to include the code

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •