Consulting

Results 1 to 2 of 2

Thread: Webservice return Encryption error

  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

  2. #2
    Moderator VBAX Wizard Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    5,217
    Location
    Welcome to the VBAX forum pavell86. I've taken the trouble to include your code within your post. Please don't expect others to chase all over the internet just because you failed to include the relevant code here.
    Remember To Do the Following....
    Use [Code].... [/Code] tags when posting code to the thread.
    Mark your thread as Solved if satisfied by using the Thread Tools options.
    If posting the same issue to another forum please show the link

Posting Permissions

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