Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 788
Default xmlHTTP.Send Questions

See code below. This used to work now I am getting an error message on the
xmlHTTP.Send

Error Message = The download of the specified resource has failed.
-2146697208 MSXML3.dll


Function submitXMLToURL() As String
Dim theURL As String
Dim xmlHTTP As New xmlHTTP
Dim txt As TextStream
Dim x As String
Dim xmlDoc As New MSXML2.DOMDocument

On Error GoTo ErrTRAP

submitXMLToURL = "-1"
Set txt = fso.OpenTextFile(Me.txtXMLFileName)
x = txt.ReadAll
txt.Close


theURL = "https://WebSiteURL"
xmlHTTP.Open "POST", theURL, False
xmlHTTP.send x

xmlDoc.async = False
xmlDoc.loadXML xmlHTTP.responseText
If xmlDoc.XML "" Then
submitXMLToURL = xmlDoc.XML
Else
submitXMLToURL = xmlHTTP.responseText
End If

ErrTRAP:

MsgBox Err.Description & Err.Number & Err.Source

End Function
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 788
Default xmlHTTP.Send Questions

Sorry, Forgot to say I put this question here because this code is in an
excel spreadsheet and it also creates the xml file that the below code
uploads.

"Chris" wrote:

See code below. This used to work now I am getting an error message on the
xmlHTTP.Send

Error Message = The download of the specified resource has failed.
-2146697208 MSXML3.dll


Function submitXMLToURL() As String
Dim theURL As String
Dim xmlHTTP As New xmlHTTP
Dim txt As TextStream
Dim x As String
Dim xmlDoc As New MSXML2.DOMDocument

On Error GoTo ErrTRAP

submitXMLToURL = "-1"
Set txt = fso.OpenTextFile(Me.txtXMLFileName)
x = txt.ReadAll
txt.Close


theURL = "https://WebSiteURL"
xmlHTTP.Open "POST", theURL, False
xmlHTTP.send x

xmlDoc.async = False
xmlDoc.loadXML xmlHTTP.responseText
If xmlDoc.XML "" Then
submitXMLToURL = xmlDoc.XML
Else
submitXMLToURL = xmlHTTP.responseText
End If

ErrTRAP:

MsgBox Err.Description & Err.Number & Err.Source

End Function

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 298
Default xmlHTTP.Send Questions

Go here http://www.fiddler2.com/fiddler2/ and download Fiddler.
You can use it to debug the server response and maybe see what the issue is.

Tim


"Chris" wrote in message
...
Sorry, Forgot to say I put this question here because this code is in an
excel spreadsheet and it also creates the xml file that the below code
uploads.

"Chris" wrote:

See code below. This used to work now I am getting an error message on
the
xmlHTTP.Send

Error Message = The download of the specified resource has failed.
-2146697208 MSXML3.dll


Function submitXMLToURL() As String
Dim theURL As String
Dim xmlHTTP As New xmlHTTP
Dim txt As TextStream
Dim x As String
Dim xmlDoc As New MSXML2.DOMDocument

On Error GoTo ErrTRAP

submitXMLToURL = "-1"
Set txt = fso.OpenTextFile(Me.txtXMLFileName)
x = txt.ReadAll
txt.Close


theURL = "https://WebSiteURL"
xmlHTTP.Open "POST", theURL, False
xmlHTTP.send x

xmlDoc.async = False
xmlDoc.loadXML xmlHTTP.responseText
If xmlDoc.XML "" Then
submitXMLToURL = xmlDoc.XML
Else
submitXMLToURL = xmlHTTP.responseText
End If

ErrTRAP:

MsgBox Err.Description & Err.Number & Err.Source

End Function



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 788
Default xmlHTTP.Send Questions

Does this work with Vista and IE7? I can't seem to get it to detect any IE
connections.

-Chris


"Tim Williams" wrote:

Go here http://www.fiddler2.com/fiddler2/ and download Fiddler.
You can use it to debug the server response and maybe see what the issue is.

Tim


"Chris" wrote in message
...
Sorry, Forgot to say I put this question here because this code is in an
excel spreadsheet and it also creates the xml file that the below code
uploads.

"Chris" wrote:

See code below. This used to work now I am getting an error message on
the
xmlHTTP.Send

Error Message = The download of the specified resource has failed.
-2146697208 MSXML3.dll


Function submitXMLToURL() As String
Dim theURL As String
Dim xmlHTTP As New xmlHTTP
Dim txt As TextStream
Dim x As String
Dim xmlDoc As New MSXML2.DOMDocument

On Error GoTo ErrTRAP

submitXMLToURL = "-1"
Set txt = fso.OpenTextFile(Me.txtXMLFileName)
x = txt.ReadAll
txt.Close


theURL = "https://WebSiteURL"
xmlHTTP.Open "POST", theURL, False
xmlHTTP.send x

xmlDoc.async = False
xmlDoc.loadXML xmlHTTP.responseText
If xmlDoc.XML "" Then
submitXMLToURL = xmlDoc.XML
Else
submitXMLToURL = xmlHTTP.responseText
End If

ErrTRAP:

MsgBox Err.Description & Err.Number & Err.Source

End Function




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 298
Default xmlHTTP.Send Questions

I just tested in IE7 and Vista and it worked fine...

Tim



"Chris" wrote in message
...
Does this work with Vista and IE7? I can't seem to get it to detect any IE
connections.

-Chris


"Tim Williams" wrote:

Go here http://www.fiddler2.com/fiddler2/ and download Fiddler.
You can use it to debug the server response and maybe see what the issue
is.

Tim


"Chris" wrote in message
...
Sorry, Forgot to say I put this question here because this code is in
an
excel spreadsheet and it also creates the xml file that the below code
uploads.

"Chris" wrote:

See code below. This used to work now I am getting an error message on
the
xmlHTTP.Send

Error Message = The download of the specified resource has failed.
-2146697208 MSXML3.dll


Function submitXMLToURL() As String
Dim theURL As String
Dim xmlHTTP As New xmlHTTP
Dim txt As TextStream
Dim x As String
Dim xmlDoc As New MSXML2.DOMDocument

On Error GoTo ErrTRAP

submitXMLToURL = "-1"
Set txt = fso.OpenTextFile(Me.txtXMLFileName)
x = txt.ReadAll
txt.Close


theURL = "https://WebSiteURL"
xmlHTTP.Open "POST", theURL, False
xmlHTTP.send x

xmlDoc.async = False
xmlDoc.loadXML xmlHTTP.responseText
If xmlDoc.XML "" Then
submitXMLToURL = xmlDoc.XML
Else
submitXMLToURL = xmlHTTP.responseText
End If

ErrTRAP:

MsgBox Err.Description & Err.Number & Err.Source

End Function






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Web Query - Tim Williams xmlhttp Object ron Excel Programming 1 July 16th 08 04:08 PM
MSXML2.XMLHTTP Works with IE6, IE6 SP 1 but not with IE6 SP 2 - wh p3plyr Excel Programming 1 April 17th 07 06:12 PM
xmlhttp and ie cache Jack Clift[_3_] Excel Programming 4 March 11th 05 02:43 AM
XMLHTTP proxy settings. Beto[_3_] Excel Programming 0 April 12th 04 08:29 PM
XMLHTTP proxy settings. Beto[_3_] Excel Programming 0 April 2nd 04 09:52 PM


All times are GMT +1. The time now is 01:30 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"