473,320 Members | 2,088 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,320 software developers and data experts.

Receive and process a XML post

I'm trying to build a page which is able to receive and process an XML message that is posted to it by some other page.
The sending page is working fine, but I don't now how to 'pick up' the sent message in the receiving page.

Right now I have the following code:

' Load the posted XML document.
Set oXML = Server.Createobject("MSXML2.DOMDocument.4.0")
oXML.async = False
oXML.setProperty "ServerHTTPRequest", True
oXML.load(Request)
oXML.save Server.MapPath("/uploads/docs/Xml/received.xml")
Set oXML = Nothing

I'm trying to write the received XML message to disk, because then I have some evidence that the page did execute. However, no file gets written (the output directory does have write access).
Since the 'listening' page will never be loaded by a browser, and thus has no "user interface", I don't know how to test the above code other than by trying to write output to some file on disk.

What am I missing?

--
Marja
Feb 23 '06 #1
3 3091
The problem may be that the file doesn't parse properly.

Using MSXML2.DOMDocument.4.0 as the ProgID will cause MSXML to be fair
strict about how the file is parsed. (E.g., blank lines preceeding an <?xml
declaration causes the file not parse).

You will need to examine the parseError property of the DOM to see why the
input is being rejected.

BTW, ServerHTTPRequest property is only necessary of you are going to give
the load method a URL.
Anthony.
Feb 23 '06 #2
Never mind, issue solved. The example code I posted was correct after all.

There was some more code on in the receiving ASP file that was causing a 500 error.
Therefore the code I posted here previously wasn't even executed.

I managed to find this by examining the response status text in the sending page after the send

--
Marja
Feb 23 '06 #3
Hi Anthony,

Thank you for your reply.

However it turned out that the code I posted here was working fine.
Something else on the receiving page was causing a problem. (See my other post)

Regards, Marja
Feb 23 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: T.S.Negi | last post by:
Hi All, I have to write a stored procedure which will send/Receive text file from/to a server by using FTP. Is anybody have done anything on it? or know about it. If yes, I would like to know...
1
by: dinoo | last post by:
I am looking this for a long time now I have a Windows Form in C#? I opened another window (of other application) or MS Word Document If user closes the document and other window is there some...
6
by: Daniel Rimmelzwaan | last post by:
I want to send a biztalk document to an aspx page, and I need to see some sample code, because I just can't make it work. I have a port with transport type HTTP, pointing to my aspx page, something...
6
by: ransoma22 | last post by:
I developing an application that receive SMS from a connected GSM handphone, e.g Siemens M55, Nokia 6230,etc through the data cable. The application(VB.NET) will receive the SMS automatically,...
3
by: Jack | last post by:
I am trying to receive xml files on my server which are posted from another server using http post. I need help in designing a receiver which will accept this xml file and send back a success...
4
by: Jay | last post by:
Hello all, I was wondering if someone can point me to a tutorial that show me how I can set up a web service that can listen for me to send a POST from a client? like so Client sends http...
6
by: rony_16 | last post by:
Hi, Does any one know how to call .net file aspx and pass him a parameters , and get and answer ? Regards,Rony
0
by: DCC700 | last post by:
Here are a couple of errors I have found in the event log system.typeinitialization NIL system.messaging.messagequeue NIL These occur when trying to send a message through ms queues to a...
0
by: Graham | last post by:
I'm trying to write a CGI script in C#; it receives data from an HTML form via the POST method, and tries to read the form data using System.Environment.GetEnvironmentVariable(). Which is where I...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.