Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / May 2008

Tip: Looking for answers? Try searching our database.

http xml post

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
CindyH - 08 May 2008 23:13 GMT
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 - 09 May 2008 05:51 GMT
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)

> Hi
>
[quoted text clipped - 14 lines]
> Thanks,
> Cindy
Cindy H - 09 May 2008 12:26 GMT
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.

> generally this means they want a form post with one form field containing
> the xml. in this case your post data is:
[quoted text clipped - 25 lines]
>> Thanks,
>> Cindy
CindyH - 09 May 2008 13:55 GMT
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

> generally this means they want a form post with one form field containing
> the xml. in this case your post data is:
[quoted text clipped - 25 lines]
>> Thanks,
>> Cindy
Martin Honnen - 09 May 2008 15:32 GMT
> 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

Signature

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

Cindy H - 10 May 2008 11:59 GMT
Yea - this is what he was asking for - thanks for everyones help!!!!

>> This of course doesn't work with httputility.urlencode(doc.outerxml) as a
>> post
[quoted text clipped - 9 lines]
>     End While
>   End Using

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.