Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

http xml post

2 views
Skip to first unread message

CindyH

unread,
May 8, 2008, 6:13:06 PM5/8/08
to
Hi

I'm working on a http xml post (request/response).

In my testing - I have been able to create and post xml string/stream and
send response
back.

But now I've been told that I should "code the whole xml payload string as a
single key"

I'm not sure what this means and haven't been able to find anything about
it.

Can anyone help me with this?

Thanks,
Cindy


bruce barker

unread,
May 9, 2008, 12:51:38 AM5/9/08
to
generally this means they want a form post with one form field
containing the xml. in this case your post data is:

string postdata = "fieldname=" + HttpUtility.UrlEncode(doc.OuterXml);

note: you should set the content-type to:
application/x-www-form-urlencoded

-- bruce (sqlwork.com)

Cindy H

unread,
May 9, 2008, 7:26:18 AM5/9/08
to
That makes sense - I'll check it out and get back to you on this.
Thanks a lot - I think you got me on the right road.


"bruce barker" <nos...@nospam.com> wrote in message
news:e4UqfBZs...@TK2MSFTNGP04.phx.gbl...

CindyH

unread,
May 9, 2008, 8:55:23 AM5/9/08
to
Hi

I'm wondering how I go about reading this for sending a reponse back.

Currently, I'm using:

Stream = New System.IO.StreamReader(Page.Request.InputStream)

Reader = New System.Xml.XmlTextReader(Stream)

Do While Reader.Read()

This of course doesn't work with httputility.urlencode(doc.outerxml) as a
post

Thanks,

Cindy

"bruce barker" <nos...@nospam.com> wrote in message
news:e4UqfBZs...@TK2MSFTNGP04.phx.gbl...

Martin Honnen

unread,
May 9, 2008, 10:32:09 AM5/9/08
to
CindyH wrote:

> This of course doesn't work with httputility.urlencode(doc.outerxml) as a
> post

If the data is posted as application/x-www-form-urlencoded then you can
access it with
Request.Form("fieldname")
so
Using reader As XmlReader = XmlReader.Create(new
StringReader(Request.Form("fieldname")))
While reader.Read()
'...
End While
End Using

--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/

Cindy H

unread,
May 10, 2008, 6:59:17 AM5/10/08
to
Yea - this is what he was asking for - thanks for everyones help!!!!

"Martin Honnen" <maho...@yahoo.de> wrote in message
news:ej6I5Fes...@TK2MSFTNGP06.phx.gbl...

0 new messages