469,592 Members | 1,850 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,592 developers. It's quick & easy.

MSXML2.ServerXMLHTTP returning Status 500 when accessing webservice


Hello everyone,

I am trying to access a webservice to post some values via
MSXML2.ServerXMLHttp
The OS used is win2003 on both machines.

When I access the local machine (A) which has the same service the call
works great.
When I access the other machine (B) that is on the same subnet, I get a
Status of 500.

sendItms ="userID=2" &"&sbID=16" &"&modID=22" &"&sesID=" &7888

'works
URL ="http://localhost/RServices/Sys/some.asmx/AddInformation"

'doesn't work
'URL ="http://remote/RServices/Sys/some.asmx/AddInformation"

Set oXMLHttp = Server.CreateObject("MSXML2.ServerXMLHTTP")

lngResolveTimeout = 1000
lngConnectTimeout = 1000
lngSendTimeout = 1000
lngReceiveTimeout = 1000
oXMLHttp.SetTimeouts lngResolveTimeout, lngConnectTimeout,
lngSendTimeout, lngReceiveTimeout

oXMLHttp.open "POST",URL,false
oXMLHttp.setRequestHeader "Content-Type",
"application/x-www-form-urlencoded"

oXMLHttp.send sendItms
if oXMLHttp.Status >= 400 And oXMLHttp.Status <=599 Then
Response.Write(oXMLHttp.Status & " - "& oXMLHttp.StatusText)
else
Response.ContentType = "text/xml"
Response.Write "response from service " & oXMLHttp.responsexml.xml
Response.Write(oXMLHttp.status & " - "& oXMLHttp.statusText)
end if
Set oXMLHttp= nothing
Can someone tell me what can cause this and what does this mean and if
it is not asking to much, how can I resolve this?

TIA,
Ed

--
ehilario
------------------------------------------------------------------------
Posted via http://www.codecomments.com
------------------------------------------------------------------------

Jul 22 '05 #1
1 13334
Display the text of the page returned when the status is 500
(oXMLHttp.responseText). It should give you an error message the same as if
you were calling the page from a browser. You might even try using an HTML
form to do the post and see what you get back.

--
--Mark Schupp
"ehilario" <eh*************@mail.codecomments.com> wrote in message
news:eh*************@mail.codecomments.com...

Hello everyone,

I am trying to access a webservice to post some values via
MSXML2.ServerXMLHttp
The OS used is win2003 on both machines.

When I access the local machine (A) which has the same service the call
works great.
When I access the other machine (B) that is on the same subnet, I get a
Status of 500.

sendItms ="userID=2" &"&sbID=16" &"&modID=22" &"&sesID=" &7888

'works
URL ="http://localhost/RServices/Sys/some.asmx/AddInformation"

'doesn't work
'URL ="http://remote/RServices/Sys/some.asmx/AddInformation"

Set oXMLHttp = Server.CreateObject("MSXML2.ServerXMLHTTP")

lngResolveTimeout = 1000
lngConnectTimeout = 1000
lngSendTimeout = 1000
lngReceiveTimeout = 1000
oXMLHttp.SetTimeouts lngResolveTimeout, lngConnectTimeout,
lngSendTimeout, lngReceiveTimeout

oXMLHttp.open "POST",URL,false
oXMLHttp.setRequestHeader "Content-Type",
"application/x-www-form-urlencoded"

oXMLHttp.send sendItms
if oXMLHttp.Status >= 400 And oXMLHttp.Status <=599 Then
Response.Write(oXMLHttp.Status & " - "& oXMLHttp.StatusText)
else
Response.ContentType = "text/xml"
Response.Write "response from service " & oXMLHttp.responsexml.xml
Response.Write(oXMLHttp.status & " - "& oXMLHttp.statusText)
end if
Set oXMLHttp= nothing
Can someone tell me what can cause this and what does this mean and if
it is not asking to much, how can I resolve this?

TIA,
Ed

--
ehilario
------------------------------------------------------------------------
Posted via http://www.codecomments.com
------------------------------------------------------------------------

Jul 22 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by RichardF | last post: by
2 posts views Thread by Maris Janis Vasilevskis | last post: by
reply views Thread by suresh191 | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.