receive xml from https post in classic ASP

receive xml from https post in classic ASP

am 24.10.2007 21:34:00 von bettys

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 & "
"
....

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.
--
Betty

Re: receive xml from https post in classic ASP

am 24.10.2007 23:03:39 von Anthony Jones

"c676228" wrote in message
news:51B3D0A5-57D3-48F5-8D9D-0C4F37AF5E6D@microsoft.com...
> 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 & "
"
> ...
>
> 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

--
Anthony Jones - MVP ASP/ASP.NET

Re: receive xml from https post in classic ASP

am 24.10.2007 23:30:00 von bettys

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
--
Betty


"Anthony Jones" wrote:

> "c676228" wrote in message
> news:51B3D0A5-57D3-48F5-8D9D-0C4F37AF5E6D@microsoft.com...
> > 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 & "
"
> > ...
> >
> > 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
>
> --
> Anthony Jones - MVP ASP/ASP.NET
>
>
>