I have taken the below web service testing code from google blog...Below code is to test webservice calls with out using Webservice addin..When i try to execute i am getting error "Connection with the server not establised" on below line of exectuion..

oWinHttp.Send sSOAPRequest

I think problem with xml request format.... but i dont know how to resolve it...Can any one help on this regard...

Please go throw the below code and help me...

================================================== =
Option Explicit

Dim sWebServiceURL, sContentType, sSOAPAction, sSOAPRequest

Dim oWinHttp
Dim sResponse

'Web Service URL

sWebServiceURL ="http://www.w3schools.com/webservices/tempconvert.asmx"

'Web Service Content Type

sContentType ="text/XML"

'Web Service SOAP Action

sSOAPAction = "http://tempuri.org/CelsiusToFahrenheit"

'Request Body

sSOAPRequest = "<?xml version=""1.0"" encoding=""utf-8""?>" & _

"<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/">" & _

"<soap:Body>" & _

"<CelsiusToFahrenheit xmlns="http://tempuri.org/">" & _

"<Celsius>25</Celsius>" & _

"</CelsiusToFahrenheit>" & _

"</soap:Body>" & _


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

'Open HTTP connection

oWinHttp.Open "POST", sWebServiceURL, False

'Setting request headers

oWinHttp.setRequestHeader "Content-Type", sContentType

oWinHttp.setRequestHeader "SOAPAction", sSOAPAction

'Send SOAP request

oWinHttp.Send sSOAPRequest

'Get XML Response

sResponse = oWinHttp.ResponseText

' Close object

Set oWinHttp = Nothing

' Extract result

Dim nPos1, nPos2

nPos1 = InStr(sResponse, "Result>") + 7

nPos2 = InStr(sResponse, "</")

If nPos1 > 7 And nPos2 > 0 Then

sResponse = Mid(sResponse, nPos1, nPos2 - nPos1)

End If

' Return result

msgbox sResponse

================================================== =