Home arrow static arrow Java Programming [Archive] - Sending xml file through Http post
Warning: Creating default object from empty value in /www/htdocs/w008deb8/wiki/components/com_staticxt/staticxt.php on line 51
Java Programming [Archive] - Sending xml file through Http post
This topic has 2 replies on 1 page.

Posts:58
Registered: 9/10/02
Sending xml file through Http post  
Aug 4, 2004 6:49 AM



 
Hi,

I like to send a xml file using Http post in java but I am not so sure how to do it.
Can anyone give me a sample code on how to achieve this?

Since xml file is a text file, I will be sending over as string right?
Do I need to worry about encoding issues?

Please advice.

Thanks.

Regards.
 

Posts:21,718
Registered: 98-02-20
Re: Sending xml file through Http post  
Aug 4, 2004 6:52 AM (reply 1 of 2)



 
Hi,

I like to send a xml file using Http post in java but
I am not so sure how to do it.
Can anyone give me a sample code on how to achieve
this?

http://www.javaalmanac.com/egs/java.net/Post.html

Since xml file is a text file, I will be sending over as string right?

Yes.

Do I need to worry about encoding issues?

Yes.

%
 

Posts:14,142
Registered: 99-04-02
Re: Sending xml file through Http post  
Aug 4, 2004 7:15 AM (reply 2 of 2)



 
Try this:
http://forum.java.sun.com/thread.jsp?forum=31&thread=451245

It's specifically for file upload from Java apps. You don't need to worry about encodings... per se. I mean, it's just going to send the bytes in the file. Of course, it should be read on the other side in the same charset encoding it was written with, but XML has a way to define that in the file, of course.
 
This topic has 2 replies on 1 page.