|
-
Oct 26th, 2006, 03:20 PM
#1
Thread Starter
New Member
HELP!!! XMLHTTP.Send Hangs
I have a client who is stuck!!!
In my VB6 application I am making a call to a web service. One client using our application in the production environment is reporting that his machine locks up when performing the web service call. No other clients hitting the same web service are having problems.
Does anyone have any idea as to what would make the XMLHTTP.Send method hang?
Clients's machine Specs.
OP = Windows XP Service Pack 2
MSXML 3 and 4 have been installed
User can access the HTTP call manually through his browser.
Code is as follows
Dim xmlURL As XMLHTTP
Set xmlURL = New XMLHTTP
xmlURL.Open "POST", "http://WebServiceAddress", False, UserName, Password
xmlURL.setRequestHeader "Content-Type", "application/xml; charset=utf-8"
xmlURL.Send "xml Text"
Thanks for your help!
-
Oct 27th, 2006, 12:42 AM
#2
PowerPoster
Re: HELP!!! XMLHTTP.Send Hangs
this is how i send values to a webpage and retrieve text using MSXML ..
I have more advanced versions laying around here .. but honestly Winsock is better. Or API if you dont want to install any controls (example for a self executable file).
VB Code:
Private Sub Command1_Click()
Text1.Text = SendXMLRequest("http://www.somewebsite.com/?id=1")
End Sub
'// REFERENCE MS XML, Version 2.0
Private Function SendXMLRequest(ByVal strUrl As String) As String
On Error GoTo err:
Dim objHTTP As MSXML.XMLHTTPRequest
Set objHTTP = New MSXML.XMLHTTPRequest
objHTTP.Open "GET", strUrl, False
objHTTP.setRequestHeader "Content-Type", "text/html"
objHTTP.send: SendXMLRequest = objHTTP.responseText
If Len(SendXMLRequest) = 0 Or InStr(1, SendXMLRequest, _
"page not found", vbTextCompare) Then _
SendXMLRequest = "Page Not Found"
Exit Function
err:
SendXMLRequest = "Error " & err.Number & _
vbCrLf & err.Description
Exit Function
End Function
Or ..
VB Code:
Dim objHTTP As New MSXML.XMLHTTPRequest ' CREATE OBJECT
objHTTP.Open "GET", strUrl, True ' START REQUEST
objHTTP.setRequestHeader "Content-Type", "text/html"
objHTTP.send ' SEND REQUEST
'//Do Until objHTTP.readyState = 4: DoEvents: Loop
SendRequest = objHTTP.responseText ' GET TEXT
Last edited by rory; Oct 27th, 2006 at 01:02 AM.
-
Oct 27th, 2006, 07:31 AM
#3
Thread Starter
New Member
Re: HELP!!! XMLHTTP.Send Hangs
Thanks for the reply rory, but my code is basically the same. It works on other machines, just one machine will not respond at the objHTTP.Send line.
Does any one know about an IE option, windows firewall, or anything else that would block XML content?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|