473,659 Members | 2,671 Online
Bytes | Software Development & Data Engineering Community
+ 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 15524
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/Systemsdevelope r cand.scient.dat , Ph.d., Mads Bondo
Dydensborg
Dansk BiblioteksCente r A/S, Tempovej 7-11, 2750 Ballerup, Tlf. +45 44 86 77
34
Oct 10 '07 #2
Mads Bondo Dydensborg <mb*@dbc.dkwrot e in
news:ui******** ******@TK2MSFTN GP06.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.dkwrot e in
news:ui******** ******@TK2MSFTN GP06.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/Systemsdevelope r cand.scient.dat , Ph.d., Mads Bondo
Dydensborg
Dansk BiblioteksCente r A/S, Tempovej 7-11, 2750 Ballerup, Tlf. +45 44 86 77
34
Oct 11 '07 #4
Mads Bondo Dydensborg <mb*@dbc.dkwrot e in
news:#B******** ******@TK2MSFTN GP05.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.dkwrot e in
news:#B******** ******@TK2MSFTN GP05.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/Systemsdevelope r cand.scient.dat , Ph.d., Mads Bondo
Dydensborg
Dansk BiblioteksCente r A/S, Tempovej 7-11, 2750 Ballerup, Tlf. +45 44 86 77
34
Oct 12 '07 #6
Mads Bondo Dydensborg <mb*@dbc.dkwrot e in news:uIHQ3sLDIH A.2004
@TK2MSFTNGP06.p hx.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(file ToSend, FileMode.Open,
FileAccess.Read , FileShare.Read) ;
BinaryReader reader = new BinaryReader(fs );
char[] data = new char[fs.Length];
reader.Read(dat a, 0, data.Length);
WebService.Send Data(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.c omwrote:
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
3397
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 xmlns="" id=instance2">
1
1907
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 received. Seems simple, but I cannot find a good example of how to do this. In the Microsoft "Developing XML Web Services.." book, there is a nice discussion of XML and how to load it from a file and directly in code as a stream/string, but no...
1
5360
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 Send/Receive pair (even if identically the same as the first pair) returns no data. eg. The following simplified code will receive some bytes: s.Send(ByteGet, ByteGet.Length, SocketFlags.None); bytes = s.Receive(RecvBytes, RecvBytes.Length, 0); //...
6
3140
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 like http://myserver/mypage.aspx. From there it gets blurry, because I just can't figure out how to do the rest. Does anybody have a sample page for me that I can take a look at? Just a simple one that takes whatever biztalk sends and saves it...
4
4506
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 what I want is to compare my .ics (calender file) file with appointment entries that are there in the calender at the time of
2
6929
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 later date post an updated return XML file to my webserver (asp.net). The primary problem I'm having is getting the posted stream to load in an XMLDocument object. When trying to read the posted stream into the XMLDocument the following error is...
4
2722
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 module..... 1)I can pass the string from the form to the module...
6
17176
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, process and output to the screen in my application when a message arrived. But the problem is how do I read the SMS message immediately when it arrived without my handphone BeEPINg for new message ? I read up the AT commands, but when getting down...
3
4070
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 message back to the sender. Can someone give me some code examples on how to design this piece? I am having difficulty proceeding with the design here. Any help will be appreciated. You can also email me code samples at jacktundra@removethis-hotmail.com
0
8427
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8330
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,...
0
8850
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, 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...
0
8746
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 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...
0
5649
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();...
0
4175
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...
0
4334
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1975
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1737
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.