receive xml from https post in classic ASP

C

c676228

Hi all,

I am writing an ASP page which is listening and waiting to receive a xml
from third party vendor. I have googled for a while. It seems to me in ASP
page, if the vendor stores xml data in a field, say, XmltoTis, then I can do
the following.(please check for me if my understanding is right :=)
InputXMLValue=Request("XmltoTis")
Set objXMLDoc=Server.CreateObject("Microsoft.XMLDOM")
objXMLDoc=InputXMLValue
''from here I can start to parse the xml data, right
Set IncomeInfoRoot=objXMLDoc.documentElement
Set DescNode=IncomeInfoRoot.selectSingleNode("totalPayment")
Response.Write DescNode.Text & "<br>"
....

what about if they store xml in the body, what should I do in classic ASP. I
saw
in .net discussion forum, people can use Request.InputStream, but not sure
how can I deal with it in asp, not see this kind of discussion.
Can you shed a light on me?
Thanks.
 
A

Anthony Jones

c676228 said:
Hi all,

I am writing an ASP page which is listening and waiting to receive a xml
from third party vendor. I have googled for a while. It seems to me in ASP
page, if the vendor stores xml data in a field, say, XmltoTis, then I can do
the following.(please check for me if my understanding is right :=)
InputXMLValue=Request("XmltoTis")
Set objXMLDoc=Server.CreateObject("Microsoft.XMLDOM")
objXMLDoc=InputXMLValue
''from here I can start to parse the xml data, right
Set IncomeInfoRoot=objXMLDoc.documentElement
Set DescNode=IncomeInfoRoot.selectSingleNode("totalPayment")
Response.Write DescNode.Text & "<br>"
...

what about if they store xml in the body, what should I do in classic ASP. I
saw
in .net discussion forum, people can use Request.InputStream, but not sure
how can I deal with it in asp, not see this kind of discussion.
Can you shed a light on me?
Thanks.

This :-

objXMLDoc=InputXMLValue

should be:-

objXMLDoc.LoadXML InputXMLValue

If the XML is posted directly as the entity body of the request (as it
should) then use:-

objXMLDoc.Load Request
 
C

c676228

Anothony,
Thank you so much for the post. It's very helpful. Your name is very
familiar to me.
I am pretty sure that you helped some of my former threads too.
No wonder your MVP for microsoft.
Sincerely
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top