how to send xml file through http post or get

This is a discussion on "how to send xml file through http post or get" within the Other Programming Languages section. This forum, and the thread "how to send xml file through http post or get are both part of the Program Your Website category.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Program Your Website > Other Programming Languages

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old Aug 9th, 2006, 13:23
New Member
Join Date: Aug 2006
Location: Bangalore
Age: 24
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
how to send xml file through http post or get

hi

Actually i need to send the xml file as parameter in the url through HTTP (get or method) For exampe , sample.xml , i want to send this xml file in the url as HTTP request and fetch the output .
Can anybody help me with the coding in java to achieve this

Thanks in advance
Arun
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Aug 9th, 2006, 17:55
spinal007's Avatar
Moderator
Join Date: Mar 2004
Location: Good Ol'London
Age: 23
Posts: 1,669
Blog Entries: 1
Thanks: 1
Thanked 4 Times in 4 Posts
Re: how to send xml file through http post or get

1. read the file into string
2. create httprequest object
3. add file's contents to querystring or post data
4. send!
Last Blog Entry: Random String in Javascript (Apr 21st, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Aug 10th, 2006, 09:56
New Member
Join Date: Aug 2006
Location: Bangalore
Age: 24
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Re: how to send xml file through http post or get

hi buddy
Thanks for ur input
I am not clear with that . can u explain that to me little elaborately with code snippet.

Thanks
Arun
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old Aug 10th, 2006, 11:36
spinal007's Avatar
Moderator
Join Date: Mar 2004
Location: Good Ol'London
Age: 23
Posts: 1,669
Blog Entries: 1
Thanks: 1
Thanked 4 Times in 4 Posts
Re: how to send xml file through http post or get

that was pseudo-code. the implementation will depend on your platform.

I know you said java but, do you really mean Java OR JavaScript OR JSP?

Here's some usefull docs:
http://www.javareference.com/jrexamp...ple.jsp?id=111
http://www.xml.com/pub/a/2005/02/09/...p-request.html
http://www.jibbering.com/2002/4/httprequest.html

JAVA:
http://www.java2s.com/Code/Java/Serv...ttoSendXML.htm
http://www.java2s.com/Code/Java/Servlets/SendXML.htm
Last Blog Entry: Random String in Javascript (Apr 21st, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5  
Old Aug 10th, 2006, 12:09
New Member
Join Date: Aug 2006
Location: Bangalore
Age: 24
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Re: how to send xml file through http post or get

hi buddy
i am getting the concept. The links that u send were very useful.

Actually i want to send the Xml file as a parameter in the url. The links u sent were talking about sending a xml file not in url , but something like redirecting the xml to the destination server. Is it possible to send a xml file as a parameter just as we do like passing strings

Thanks
Arun
Transworld
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6  
Old Aug 10th, 2006, 15:22
spinal007's Avatar
Moderator
Join Date: Mar 2004
Location: Good Ol'London
Age: 23
Posts: 1,669
Blog Entries: 1
Thanks: 1
Thanked 4 Times in 4 Posts
Re: how to send xml file through http post or get

ok, so you don't want to "send an xml file",
you want to send a string which happens to be the name of an xml file.

again, similar to the methods described on the links I sent you.
Just pass the variable in the request url like this:
http://www.www.com/some-script.asp?xml=YourXmlFileName.xml
Last Blog Entry: Random String in Javascript (Apr 21st, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
send, xml, file, through, http, post

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
could someone send me their php.ini file please? alexgeek PHP Forum 7 Sep 20th, 2007 23:32
http://localhost/file.php azilaka PHP Forum 16 Jul 13th, 2007 21:56
http post xml string and binary file in multipart message pezkel Classic ASP 0 Jun 10th, 2007 08:12
URGENT!!!! Send HTTP request from one web server to another server chandra.nowduri ASP.NET Forum 1 Aug 7th, 2006 19:18
Handling http post with php lmwaldal PHP Forum 2 Aug 23rd, 2005 12:19


All times are GMT. The time now is 23:44.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved