HI,
I have the following simple webservice:
I am trying to get it to execute with a SOAP message by the following code:
on the last line however i get "The parameter is incorrect" and then loads of lines of stuff that i can't make much sense of. Any body able to help? I am starting to get desperate now as i've tried everything i can think of to get this to work.
Cheers
Nick
I have the following simple webservice:
Code:
<WebMethod()> Public Function HelloWorld2(ByVal mess As String) As String
HelloWorld2 = mess
End Function
I am trying to get it to execute with a SOAP message by the following code:
Code:
Dim xmlHttp = CreateObject("Microsoft.XMLHTTP")
soapTest = "POST /tkTest/tkTest.asmx HTTP/1.1" & vbLf
soapTest = soapTest & "Host: localhost" & vbLf
soapTest = soapTest & "Content-Type: text/xml; charset=utf-8" & vbLf
soapTest = soapTest & "Content-Length : 4" & vbLf
soapTest = soapTest & "SOAPAction: ""http://localhost/tkTest.asmx/HelloWorld2""" & vbLf
soapTest = soapTest & "<?xml version=""1.0"" encoding=""utf-8""?>" & vbLf
soapTest = soapTest & "<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/"">" & vbLf
soapTest = soapTest & "<soap:Body>" & vbLf
soapTest = soapTest & "<HelloWorld2 xmlns=""http://localhost/tkTest.asmx"">" & vbLf
soapTest = soapTest & "<mess>test</mess>" & vbLf
soapTest = soapTest & "</HelloWorld2>" & vbLf
soapTest = soapTest & "</soap:Body>" & vbLf
soapTest = soapTest & "</soap:Envelope>" & vbLf
xmlHttp.open("POST", "http://localhost/tktest/tktest.asmx",false)
xmlHttp.send(soapTest)
on the last line however i get "The parameter is incorrect" and then loads of lines of stuff that i can't make much sense of. Any body able to help? I am starting to get desperate now as i've tried everything i can think of to get this to work.
Cheers
Nick