none
Facing issue while calling a WCF webservice (under HTTPS) from VBS file RRS feed

  • Question

  • I have created a WCF WebService having multiple svc files. I call the method in the svc file from vbscript using below code:


        ScriptTimeOut = 6000000

        Dim soapServer, soapMessage

        soapServer = "https://example.com/marketyardwebservice/SchedulerClasses/MailIntimations.svc"

        soapMessage = "<s:Envelope xmlns:s=" & GetQuotedUrl("http://schemas.xmlsoap.org/soap/envelope/") & ">" & _ 
        "<s:body>" & _ 
        "<AuctionWinnerSendMail xmlns=" & GetQuotedUrl("http://tempuri.org/") & ">" & _
        ""

        soapMessage = Replace(soapMessage, "'", chr(34))

        Set xmlhttp = CreateObject("MSXML2.ServerXMLHTTP")

        xmlhttp.SetOption 2, xmlhttp.GetOption(2) 
        Dim lResolve,lConnect,lSend,lReceive
        lResolve = 5 * 1000
        lConnect = 60 * 1000
        lSend = 600 * 1000
        lReceive = 600 * 1000

        xmlhttp.setTimeouts lResolve, lConnect, lSend, lReceive

        xmlhttp.open "POST", soapServer, False
        xmlhttp.setRequestHeader "Man", POST & " " & soapServer & " HTTP/1.1"
        xmlhttp.setRequestHeader "SOAPAction", "http://tempuri.org/IMailIntimations/AuctionWinnerSendMail"
        xmlhttp.setRequestHeader "Content-Type", "text/xml; charset=utf-8"

        xmlhttp.send(soapMessage)

        Function GetQuotedUrl(ByVal value)
            GetQuotedUrl = Chr(34) & value & Chr(34)
        End Function



    The above script gets executed properly when https is not enabled. But as soon as i enable HTTPS, I am getting the following error when the vbscript gets executed "A certificate is required to complete client authentication".

    Please can anybody help me, as to how i can resolve this issue.
    Thanks in advance
    Tuesday, November 28, 2017 8:42 AM

All replies