473,498 Members | 1,633 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

http xml post

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
Jun 27 '08 #1
5 1763
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)
CindyH wrote:
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

Jun 27 '08 #2
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" <no****@nospam.comwrote in message
news:e4**************@TK2MSFTNGP04.phx.gbl...
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)
CindyH wrote:
>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
Jun 27 '08 #3
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" <no****@nospam.comwrote in message
news:e4**************@TK2MSFTNGP04.phx.gbl...
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)
CindyH wrote:
>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
Jun 27 '08 #4
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/
Jun 27 '08 #5
Yea - this is what he was asking for - thanks for everyones help!!!!

"Martin Honnen" <ma*******@yahoo.dewrote in message
news:ej**************@TK2MSFTNGP06.phx.gbl...
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/

Jun 27 '08 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
17108
by: Gary Petersen | last post by:
For the benefit of others, I want to show how to do an HTTP POST request using fsockopen(). I banged my head against a wall for two days trying to figure this out. I even went to http://php.net/...
0
2427
by: Spud | last post by:
<?php // pullpage function by Nick bouton http://www.nickbouton.com/. $CustomerID = "IDHERE"; $method = "POST"; $host = "xml.mydata.com"; $usepath = "/xml.asp"; //print all vars in an...
7
2586
by: Dodger | last post by:
Apologies if the is the wrong NG. But I have trapped a GET issued by a webpage on a button press and I would like to issue the GET programatically as-and-when I wish. I wondered what the text...
0
1808
by: Owen | last post by:
Hello everyone, I am using VS.NET 2003(Trandition Chinese) Edition, and httpLook software for checking http requests. I found a problem that the following programs don't really "POST". These...
0
3855
by: WIWA | last post by:
Hi, I want to login to a password protected website and fetch the content of the page behind. I have based my code on http://weblogs.asp.net/jdennany/archive/2005/04/23/403971.aspx. When I use...
5
10374
by: David Lozzi | last post by:
Howdy, I wrote a web service in .Net for my customer. My customer has another vendor who now has to consume it but they are not using Visual Studio. Most of their pages are jsp, and they said...
3
4888
by: JansenH | last post by:
We have implemented a 'HTTP Post' client in C# that posts Xml documents to a webserver. This is working fine if the post rate is one post for every 20 seconds. But if the post rate is increased to...
1
2589
by: Arfeen | last post by:
Hi All, I need help again ..... I have an asp.net web page which I hit using the "HTTP POST" method. My ASP.NET page is a basic hello world example with the following code: private void...
2
5416
by: =?Utf-8?B?cGhlbmdsYWk=?= | last post by:
I am not sure really how to explain this but here goes. I am creating some new web services and I want to be able to post data like the following: <Data> <some value>1</some value> <more...
6
5089
by: Brybot | last post by:
I am trying to allow HTTP POST file uploads to my web service. Currently I have it working perfectly for a SOAP/XML request reading in a byte using MemoryStream/FileStream but I cannot figure out...
0
7125
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7167
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
6890
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5464
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4915
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4593
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3095
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1423
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
657
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.