Hi everyone,
I was wondering if anybody could help me with sending xml as part of an
http post. Any help will be greatly appreciated.
Thanks. 8 5610
what are your issues with it? what problems are you having?
"Maximus" <me@maximus.net > wrote in message
news:OM******** ******@TK2MSFTN GP12.phx.gbl... Hi everyone,
I was wondering if anybody could help me with sending xml as part of an http post. Any help will be greatly appreciated. Thanks.
what are your issues with it? what problems are you having?
"Maximus" <me@maximus.net > wrote in message
news:OM******** ******@TK2MSFTN GP12.phx.gbl... Hi everyone,
I was wondering if anybody could help me with sending xml as part of an http post. Any help will be greatly appreciated. Thanks.
you can user WebRequest class, and set xml data as the post data
"Maximus" <me@maximus.net > ????
news:OM******** ******@TK2MSFTN GP12.phx.gbl... Hi everyone,
I was wondering if anybody could help me with sending xml as part of an http post. Any help will be greatly appreciated. Thanks.
you can user WebRequest class, and set xml data as the post data
"Maximus" <me@maximus.net > ????
news:OM******** ******@TK2MSFTN GP12.phx.gbl... Hi everyone,
I was wondering if anybody could help me with sending xml as part of an http post. Any help will be greatly appreciated. Thanks.
Maximus wrote: Hi everyone,
I was wondering if anybody could help me with sending xml as part of an http post. Any help will be greatly appreciated.
This sample method shows how to post an XML string "xml" to a web
application located at "url".
public void PostXml(string url, string xml) {
byte[] bytes = Encoding.UTF8.G etBytes(xml);
HttpWebRequest request = (HttpWebRequest ) WebRequest.Crea te(url);
request.Method = "POST";
request.Content Length = bytes.Length;
request.Content Type = "text/xml";
using (Stream requestStream = request.GetRequ estStream()) {
requestStream.W rite(bytes, 0, bytes.Length);
}
HttpWebResponse response = (HttpWebRespons e) request.GetResp onse();
if (response.Statu sCode != HttpStatusCode. OK) {
string message = String.Format(" POST failed. Received HTTP {0}",
response.Status Code);
throw new ApplicationExce ption(message);
}
}
Cheers,
--
Joerg Jooss jo*********@gmx .net
Maximus wrote: Hi everyone,
I was wondering if anybody could help me with sending xml as part of an http post. Any help will be greatly appreciated.
This sample method shows how to post an XML string "xml" to a web
application located at "url".
public void PostXml(string url, string xml) {
byte[] bytes = Encoding.UTF8.G etBytes(xml);
HttpWebRequest request = (HttpWebRequest ) WebRequest.Crea te(url);
request.Method = "POST";
request.Content Length = bytes.Length;
request.Content Type = "text/xml";
using (Stream requestStream = request.GetRequ estStream()) {
requestStream.W rite(bytes, 0, bytes.Length);
}
HttpWebResponse response = (HttpWebRespons e) request.GetResp onse();
if (response.Statu sCode != HttpStatusCode. OK) {
string message = String.Format(" POST failed. Received HTTP {0}",
response.Status Code);
throw new ApplicationExce ption(message);
}
}
Cheers,
--
Joerg Jooss jo*********@gmx .net
I'm trying to do the same thing in vb.net.
Is there an equivalent vb.net example?
Thanks
Leslie
On Sun, 11 Apr 2004 11:27:55 +0200, "Joerg Jooss"
<jo*********@gm x.net> wrote: Maximus wrote: Hi everyone,
I was wondering if anybody could help me with sending xml as part of an http post. Any help will be greatly appreciated.
This sample method shows how to post an XML string "xml" to a web application located at "url".
public void PostXml(string url, string xml) { byte[] bytes = Encoding.UTF8.G etBytes(xml); HttpWebRequest request = (HttpWebRequest ) WebRequest.Crea te(url); request.Method = "POST"; request.Content Length = bytes.Length; request.Content Type = "text/xml"; using (Stream requestStream = request.GetRequ estStream()) { requestStream.W rite(bytes, 0, bytes.Length); }
HttpWebResponse response = (HttpWebRespons e) request.GetResp onse(); if (response.Statu sCode != HttpStatusCode. OK) { string message = String.Format(" POST failed. Received HTTP {0}", response.Status Code); throw new ApplicationExce ption(message); } }
Cheers,
I'm trying to do the same thing in vb.net.
Is there an equivalent vb.net example?
Thanks
Leslie
On Sun, 11 Apr 2004 11:27:55 +0200, "Joerg Jooss"
<jo*********@gm x.net> wrote: Maximus wrote: Hi everyone,
I was wondering if anybody could help me with sending xml as part of an http post. Any help will be greatly appreciated.
This sample method shows how to post an XML string "xml" to a web application located at "url".
public void PostXml(string url, string xml) { byte[] bytes = Encoding.UTF8.G etBytes(xml); HttpWebRequest request = (HttpWebRequest ) WebRequest.Crea te(url); request.Method = "POST"; request.Content Length = bytes.Length; request.Content Type = "text/xml"; using (Stream requestStream = request.GetRequ estStream()) { requestStream.W rite(bytes, 0, bytes.Length); }
HttpWebResponse response = (HttpWebRespons e) request.GetResp onse(); if (response.Statu sCode != HttpStatusCode. OK) { string message = String.Format(" POST failed. Received HTTP {0}", response.Status Code); throw new ApplicationExce ption(message); } }
Cheers, This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: yawnmoth |
last post by:
i'm trying to send an http post request and see if the server got it
correctly. i'm sending the http post request with this script:
<?
$address = 'domain.tld';
$port = 80;
$proxy = fsockopen("tcp://$address", (int) $port, $errno, $errstr, 1);
$extra = "extra=blah&this=test";
|
by: Jared |
last post by:
Hello people,
I've had major difficulties finding the right Java technology that can
be used to make an e-mail applet program. I'm trying to build an
applet that would be similar, but much simpler, than Hotmail or
Webmail. I've been told by our system administrator that I can't
access our SMTP and POP3 servers directly. If I could use SMTP or
POP3, this problem would be trivial, I think. But instead, I'm forced
to rely on the HTTP...
|
by: CHIN |
last post by:
Hi all.. here s my problem ( maybe some of you saw me on other groups, but i
cant find the solution !! )
I have to upload a file to an external site, so, i made a .vbs file , that
logins to the site, and then i have to select the file to upload.. i used
sendkeys.. and i worked perfect.. BUT ... the computer must be locked for
security ( obviusly ) reazons.. so..i think this probable solutions to
unlock the computer and run the...
|
by: Maximus |
last post by:
Hi everyone,
I was wondering if anybody could help me with sending xml as part of an
http post. Any help will be greatly appreciated.
Thanks.
|
by: Lau |
last post by:
I need to send 1000 emails from an asp.net website.
Normally I would use System.Web.Mail.MailMessage() to send thru an SMTP
server.
But the large amount of emails results in a timeout. My server administrator
told me to write the emails to the “pickup directory” instead. I know that
JMail can do this in ASP, but how do you do this in asp.net?
--
--------------------
| |
by: Vishal |
last post by:
Hello,
I already asked this question in the ASP.NET forums,
but no help came. So I am hoping that somebody can help me
out. This is really very URGENT me.
For my e-commerce application, I need to send data from my
server via the post method to the payment server. The
payment server does not run asp.net. I dont know what they
run. The payment server then returns to my server with the
|
by: Sydney |
last post by:
Hi,
I am trying to construct a WSE 2.0 security SOAP request in VBScript on an
HTML page to send off to a webservice. I think I've almost got it but I'm
having an issue generating the nonce value for the UserName token. Is it
possilbe at all to do this from VBScript (or jscript?)? I know I will be
limited with what I can do with the SOAP message. Eg/ can't sign/encrypt it
etc.
Thanks,
|
by: sanjaygupta11 |
last post by:
I am using httpwebrequest and httpwebresponse objects for sending data to remote appication by post and receiving the response from there.
I am using this code in my windows application which will send a request to remote application.
---------------------------------------------------------------------------------------------------------------
string lcUrl = "http://localhost/check/WebSite3/Default.aspx";
HttpWebRequest loHttp...
|
by: jabdulius |
last post by:
Hi all,
I'm trying to send a page using Perl via the WCTP protocol. For some reason, I cannot connect to the host "wctp.att.net/WCTP" (or any host for that matter). I figure it must be some server configuration that I need to set. I don't think it's a port problem b/c I'm able to send a page via WCTP using the same port using a stand-alone app.
Anyhow, here's the code I'm using:
sub send_wctp_old{
#my $url =...
|
by: Markgoldin |
last post by:
I am sending an XML data from not dontnet process to a .Net via socket
listener.
Here is a data sample:
<VFPData>
<serverdata>
<coderun>updateFloor</coderun>
<area>MD2</area>
<zone>BOXING</zone>
<status>Running</status>
<job>1000139233</job>
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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 projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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 presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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 then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
| |
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |