473,486 Members | 1,889 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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 14583
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1328
by: ehilario | last post by:
Thanks Mark, That 's better than internal server error. This is what came back, which is confusing because when its called locally it comes back fine. Am I missing something? -Ed
5
17836
by: katrinaVictim | last post by:
Question: I get the eror listed at the bottom of the post. What can I do to make the response of the x1.send a "binary" type? Or, in general, how can I just "make this work"? <%@...
2
21691
by: Michael Christensen | last post by:
Hi How do I send an input-param to my web service with MSXML2.ServerXMLHTTP? Can this be done without the soap-toolkit? Can't find anything about it - looking forward getting some help :-)...
0
4213
by: Sia Jai Sung | last post by:
Hi, I need to write a ASPX file that will post some request to other party (web service written in java), here is my code, <%@ Page aspcompat=true %> <% Dim xml, url
1
6551
by: Raúl Martín | last post by:
I´ve a function in asp that run correctly but If I tried to change it forasp.net in asp: xmlHTTP = CreateObject("Microsoft.XMLHTTP") And I thought to use this sentence for asp.net but the...
0
1089
by: RichardF | last post by:
I have a solution that contains a web service and a web site. I was working on it all day Monday with no problems. Tuesday morning it stopped working, but ONLY when run from inside Visual...
2
8715
by: Maris Janis Vasilevskis | last post by:
Hi, Is it possible to force HttpWebRequest to do exactly (not approximately) the same as MSXML2.ServerXMLHTTP does? More details. I port JScript to JScript.NET I have a server (ASP invoking...
8
21726
by: lopi | last post by:
Hello. I'm trying to remotely get a pdf file - http://remoteServer/file.pdf - in order to store it into another server, maybe with Scripting.FileSystemObject However the following code doesn't...
0
2235
by: Quickzilverfox | last post by:
I am attempting to send a purchase request string to a webservice on a remote site I am able to successfully send the quoterequest using Msxml2.ServerXMLHTTP on one page and parse the response. ...
0
6964
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7123
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
6839
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7305
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
4863
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3066
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1378
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
598
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
259
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.