473,396 Members | 2,010 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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 14566
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
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
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
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
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
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
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
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
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
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
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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
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,...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
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...

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.