XMLHTTP Get Method & WebService (also Posted in Classic Visual Basic)
Hey Chaps.
Any ideas why I can't consume a .Net WebService using the XMLHTTP ??
The code below doesn't work & I don't understand why as, in reality, all the WebService is returning is an XML string ??
VB Code:
Dim x As New MSXML2.DOMDocument30
Dim h As New MSXML2.XMLHTTP30
h.open "GET", "http://localhost/SPXTEST/Service1.asmx/HelloWorld", False
x.Load h.responseXML
I know you should consume using SOAP etc etc but I don't want the aggro....
Thanks
Chubby.
Re: XMLHTTP Get Method & WebService (also Posted in Classic Visual Basic)
But a Web Service expects a POST request with a special message. A SOAP request, to be precise.
Re: XMLHTTP Get Method & WebService (also Posted in Classic Visual Basic)
Agreed, but I don't want to got to the effort of forcing SOAP in this design since I know precisely each time what the XML will be returning and I've no need of marshalling and minimal parsing. I've discovered the resolution though as I placed resolved in the other forum:
[Pah ! What a resolution ! I found out that both the methods HTTPPost & HTTPGet are commented out in the Machine.Config files for the .Net Framework. I can only suppose this is to force you into uisng WSDL instead of HTTP Gets & Posts for .Net... Anyhoo I uncommented them and away I go...
Man does that save some pain.... :eek: ]
Cheers.
Chubby.