473,472 Members | 2,257 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How to receive/send XML file through HTTP Post?

I am trying to receive/send xml files with predefined schema from/to another
server using http post, and a success message back to the sender
Would someone give me a start point where I can start to design the piece?
Is webservice the best practise to use? Could someone give a code sample or
point me a resource on the web?
Thanks you very much!
Oct 9 '07 #1
7 15506
Spam Catcher wrote:
>I have been struggling with this issue myself for some time now.
Originally I was under the impression that I needed to use remoting
for this.

Remoting is for interprocess communication - not for sending HTTP posts.
I am getting closer and closer to that understanding :-)
You could device an HTTP interprocess communications protocol, but you
might as well use standard remoting, WCF, or Web services. No need to
reinvent the wheel :-)
I totally agree. I ended up here, due to a lack of knowledge about the
framework. I _did_ ask in several newsgroups, but probably did not frame my
question in a sensible way.
If you're doing HTTP posts - I would just go with the WebClient/WebRequest
method. Much simplier.
So, you are suggesting another road than Arne?

Just to clarify: I am implementing the server, not the client. I do not care
about the client actually, but do have to support a fixed format on the
wire. WebRequest looks very much client like?

Regards,

Mads

--
Med venlig hilsen/Regards

Systemudvikler/Systemsdeveloper cand.scient.dat, Ph.d., Mads Bondo
Dydensborg
Dansk BiblioteksCenter A/S, Tempovej 7-11, 2750 Ballerup, Tlf. +45 44 86 77
34
Oct 10 '07 #2
Mads Bondo Dydensborg <mb*@dbc.dkwrote in
news:ui**************@TK2MSFTNGP06.phx.gbl:
>If you're doing HTTP posts - I would just go with the
WebClient/WebRequest method. Much simplier.

So, you are suggesting another road than Arne?

Just to clarify: I am implementing the server, not the client. I do
not care about the client actually, but do have to support a fixed
format on the wire. WebRequest looks very much client like?
OH - if you're the server just use ASP.NET!

ASP.NET (or even classic ASP...) can receive form posts **very** easily.
Oct 10 '07 #3
Spam Catcher wrote:
Mads Bondo Dydensborg <mb*@dbc.dkwrote in
news:ui**************@TK2MSFTNGP06.phx.gbl:
>>If you're doing HTTP posts - I would just go with the
WebClient/WebRequest method. Much simplier.

So, you are suggesting another road than Arne?

Just to clarify: I am implementing the server, not the client. I do
not care about the client actually, but do have to support a fixed
format on the wire. WebRequest looks very much client like?

OH - if you're the server just use ASP.NET!

ASP.NET (or even classic ASP...) can receive form posts **very** easily.
It is a requirement that this service may have to be run standalone, that
is, outside a web server. (It also needs to run under Linux/Mono). But, if
I ignore that issue, then that is the best solution, I imagine.

It wont be forms that are posted, btw, but that should not matter for this
discussion.

Thanks,

Mads

--
Med venlig hilsen/Regards

Systemudvikler/Systemsdeveloper cand.scient.dat, Ph.d., Mads Bondo
Dydensborg
Dansk BiblioteksCenter A/S, Tempovej 7-11, 2750 Ballerup, Tlf. +45 44 86 77
34
Oct 11 '07 #4
Mads Bondo Dydensborg <mb*@dbc.dkwrote in
news:#B**************@TK2MSFTNGP05.phx.gbl:
It is a requirement that this service may have to be run standalone,
that is, outside a web server. (It also needs to run under
Linux/Mono). But, if I ignore that issue, then that is the best
solution, I imagine.
How about PHP? PHP is cross-platform?
It wont be forms that are posted, btw, but that should not matter for
this discussion.
Oct 11 '07 #5
Spam Catcher wrote:
Mads Bondo Dydensborg <mb*@dbc.dkwrote in
news:#B**************@TK2MSFTNGP05.phx.gbl:
>It is a requirement that this service may have to be run standalone,
that is, outside a web server. (It also needs to run under
Linux/Mono). But, if I ignore that issue, then that is the best
solution, I imagine.

How about PHP? PHP is cross-platform?
Interessting thing. How should I then communicate from PHP with the C#
service?

Regards,

Mads

--
Med venlig hilsen/Regards

Systemudvikler/Systemsdeveloper cand.scient.dat, Ph.d., Mads Bondo
Dydensborg
Dansk BiblioteksCenter A/S, Tempovej 7-11, 2750 Ballerup, Tlf. +45 44 86 77
34
Oct 12 '07 #6
Mads Bondo Dydensborg <mb*@dbc.dkwrote in news:uIHQ3sLDIHA.2004
@TK2MSFTNGP06.phx.gbl:
Interessting thing. How should I then communicate from PHP with the C#
service?
Easiest method would be to dump a record into a database, which your
service will pickup and process. Not exactly fancy, but it should work.

However, if you were entirely on .NET (i.e. ASP.NET) you could have
connected directly with the service via remoting or WCF and talked to the
service using a network communications channel.
Oct 15 '07 #7
I just passed whole XML content as a parameter to the Web Service. It
looked like this:
FileStream fs = new FileStream(fileToSend, FileMode.Open,
FileAccess.Read, FileShare.Read);
BinaryReader reader = new BinaryReader(fs);
char[] data = new char[fs.Length];
reader.Read(data, 0, data.Length);
WebService.SendData(settings["PDAID"], new string(data));

Originally the Web Service was hosted on the ASP.NET, but later was
migrated to PHP. Client part was not changed.

On Oct 9, 7:13 am, "John Dow" <zho...@gmail.comwrote:
I am trying to receive/send xml files with predefined schema from/to another
server using http post, and a success message back to the sender
Would someone give me a start point where I can start to design the piece?
Is webservice the best practise to use? Could someone give a code sample or
point me a resource on the web?
Thanks you very much!

Oct 16 '07 #8

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

Similar topics

0
by: arti | last post by:
Hi all. I have a problem/question with XForms. I have 2 instnace in my document, instance1 and instance2. <xforms:instance xmlns="" id=instance1"> .... </xforms:instance> <xforms:instance...
1
by: Jeffrey Roughgarden | last post by:
I would like to receive XML over the internet (via HTTP Post or SOAP), read it, perform some server side operations, and send back an XML response that would depend on the contents of the XML...
1
by: Kitchen Bin | last post by:
Hi. I am trying to use Sockets to do multiple Send and Receives via HTTP (not simultaneously). A first pair of Send/Receives works fine and sure enough I receive HTML back, but the next...
6
by: Daniel Rimmelzwaan | last post by:
I want to send a biztalk document to an aspx page, and I need to see some sample code, because I just can't make it work. I have a port with transport type HTTP, pointing to my aspx page, something...
4
by: saurabhaggarwal | last post by:
Hi Could anyone please tell me how can we capture send/receive event in MS Outlook. Suppose I want to pop up a message box when user hits send/receive button, how can we do that. Actually...
2
by: Amoril | last post by:
I am currently developing an app that will post an XML file (1 to 100MB+ in size) to an outside vendor application via HTTPS Post (doing this in a vb.net windows app). The vendor will then at some...
4
by: http://www.visual-basic-data-mining.net/forum | last post by:
Hi Does anyone know how to stay connected to the server and at the same time i can pass the string to and from the module to the form..... What I want: I put the connection at the...
6
by: ransoma22 | last post by:
I developing an application that receive SMS from a connected GSM handphone, e.g Siemens M55, Nokia 6230,etc through the data cable. The application(VB.NET) will receive the SMS automatically,...
3
by: Jack | last post by:
I am trying to receive xml files on my server which are posted from another server using http post. I need help in designing a receiver which will accept this xml file and send back a success...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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,...
0
jinu1996
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...
1
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
tracyyun
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...
0
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,...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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 ...

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.