Connecting Tech Pros Worldwide Help | Site Map

How to conume xml sent over http post

swl
Guest
 
Posts: n/a
#1: Nov 11 '05
How do I consume xml and send back an xml response not using SOAP in
an asp.net aspx page using vb.net?
Magus
Guest
 
Posts: n/a
#2: Nov 11 '05

re: How to conume xml sent over http post


One way of achieving this is by using XMLHTTP on the
client to POST XML-data to server.

Then make a custom parser in the ASP.NET to read the XML
from POST-data on the Request object.

When you shall make response back to client, you put your
XML-data in the Response.Write method.

XMLHTTP will the receive the response on the client as
pure XML.

We have successfully used this method in VB6/ASP and
in .NET in order to quickly make simple websites. You
don't always have to use the whole WebForm framework :D

/Magus

[color=blue]
>-----Original Message-----
>How do I consume xml and send back an xml response not[/color]
using SOAP in[color=blue]
>an asp.net aspx page using vb.net?
>.
>[/color]
Dino Chiesa [Microsoft]
Guest
 
Posts: n/a
#3: Nov 11 '05

re: How to conume xml sent over http post


working example sending back XML (sorry, C#)
http://www.winisp.net/cheeso/xml1/Xm...?orderId=11042

source code:
http://www.winisp.net/cheeso/srcview...lDataFeed.aspx


--
Dino Chiesa
Microsoft Developer Division
d i n o c h @ o n l i n e . m i c r o s o f t . c o m


"swl" <swl8@yahoo.com> wrote in message
news:eaadd143.0310140529.702c9960@posting.google.c om...[color=blue]
> How do I consume xml and send back an xml response not using SOAP in
> an asp.net aspx page using vb.net?[/color]


swl
Guest
 
Posts: n/a
#4: Nov 11 '05

re: How to conume xml sent over http post


I was thinking about using the following in the pageload

dim doc as System.Xml.XmlDocument = new XmlDocument()
doc.Load(Request.InputStream)

Once I consume the xml I want to send xml back using http post.

swl8@yahoo.com (swl) wrote in message news:<eaadd143.0310140529.702c9960@posting.google. com>...[color=blue]
> How do I consume xml and send back an xml response not using SOAP in
> an asp.net aspx page using vb.net?[/color]
swl
Guest
 
Posts: n/a
#5: Nov 11 '05

re: How to conume xml sent over http post


thanks for the help

the following works:

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
Try
Dim doc As System.Xml.XmlDocument = New XmlDocument()

doc.Load(Request.InputStream)

Dim singlenode As XmlNode =
doc.SelectSingleNode("nodename1")
Dim strnodevalue As String = singlenode.InnerText

Dim nodeatt As XmlAttribute =
singlenode.Attributes("attribute1")
Dim attributevalue As String = nodeatt.InnerXml

'do something

Dim doc2 As XmlDocument = New XmlDocument()
doc2.Load(Server.MapPath("test.xml"))




doc2.Save(Response.OutputStream)



End Sub

swl8@yahoo.com (swl) wrote in message news:<eaadd143.0310140918.466a5456@posting.google. com>...[color=blue]
> I was thinking about using the following in the pageload
>
> dim doc as System.Xml.XmlDocument = new XmlDocument()
> doc.Load(Request.InputStream)
>
> Once I consume the xml I want to send xml back using http post.
>
> swl8@yahoo.com (swl) wrote in message news:<eaadd143.0310140529.702c9960@posting.google. com>...[color=green]
> > How do I consume xml and send back an xml response not using SOAP in
> > an asp.net aspx page using vb.net?[/color][/color]
Closed Thread