0 Replies Latest reply: Mar 29, 2018 10:10 AM by duygu sarp RSS

    A certificate is required to complete client authentication

    duygu sarp

      Hi,

      I want to send  xml data to a web service with basic authantication. My code is below. But I get "A certificate is required to complete client authentication" error. But when i test the web service in postman it is ok. Could you help about this?

       

      sub PostToWebService(sXML, sTableID)

       

          HTTPREQUEST_SETCREDENTIALS_FOR_SERVER = 0

          userid = "xxx"                              ' MODIFY TO FIT YOUR NEEDS

          apikey = "xxx." ' MUST SPECIFY A VALID API KEY TOKEN  

       

       

           xmlurl = "https:***"

       

       

       

         'Create xmlhttp opject and submit

       

           Set xmlhttp = CreateObject("WinHttp.WinHttpRequest.5.1")

       

          xmlhttp.open "POST", xmlurl, false

       

       

       

       

          xmlhttp.setRequestHeader "Content-Type", "text/xml"

       

        

          xmlhttp.setRequestHeader "Authorization", "Basic ***"

       

       

       

          xmlhttp.send sXML

        

         'now get the results from processing

          xmlhttp.WaitForResponse

          sResult = xmlhttp.StatusText

      '    msgbox(sResult)

      end sub