MSXML in VB.NET

Dustin Nazari

New Member
This code works well in good old VB6. I have tried all kinds of ways to do this in VB.NET but can't get it to work. Can anyone help me with code that works in .NET please?\[code\]Dim objHTTP As New MSXML2.XMLHTTPDim strReturn As StringDim objReturn As New MSXML2.DOMDocumentDim url As StringDim XMLEnvelope As Stringurl = "http://zzzzzdummy.com"XMLEnvelope = vbNullobjHTTP.open("post", url, False, "", "") 'Debug.Print(Err.Number)objHTTP.setRequestHeader("Content-Type", "text/xml")objHTTP.setRequestHeader("Content-length", Len(XMLEnvelope))Debug.Print("------------Send Envelope-------------")Debug.Print(XMLEnvelope)Debug.Print("--------------------------------------")objHTTP.send(XMLEnvelope)strReturn = objHTTP.responseTextobjReturn.loadXML(strReturn)Debug.Print("----------Response Envelope-----------")Debug.Print(strReturn)Debug.Print("--------------------------------------")\[/code\]
 
Back
Top