i have a very simple web servive
Imports System.Web.Services
<System.Web.Services.WebService(Namespace:="urn:Ex ample1")> _
Public Class Example1
Inherits System.Web.Services.WebService
<WebMethod()> _
Public Function HelloWorld(ByVal name As String) As String
Return "Hello " & name
End Function
End Class
I have a VB Script with which I'm trying to send a soap message with. When
i execute i get to the input soap message message box showing me the
message, but when i click ok, it seems to hang. i have to kill the script
through taskmgr. this is on windows 2000.
Any ideas why it wouldn't return?
Dim x, h
Set x = CreateObject("MSXML2.DOMDocument")
x.loadXML "<s:Envelope xmlns:s='http://schemas.xmlsoap.org/soap/envelope/'
xmlns:xsi='http://www.w3.org/1999/XMLSchema-instance'
xmlns:xsd='http://www.w3.org/1999/XMLSchema'><s:Body><m:sayHello
xmlns:m='urn:Example1'><name
xsi:type='xsd:string'>James</name></m:sayHello></s:Body></s:Envelope>"
msgbox x.xml, , "Input SOAP Message"
Set h = CreateObject("Microsoft.XMLHTTP")
h.open "POST", "http://localhost/HelloWorld/Service1.asmx"
h.send (x)
while h.readyState <> 4
wend
msgbox h.responseText,,"Output SOAP Message"