Two Laptop Bag*
The moose likes XML and Related Technologies and the fly likes How to send the request and retrieve response Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "How to send the request and retrieve response" Watch "How to send the request and retrieve response" New topic
Author

How to send the request and retrieve response

K Kiran Kumar
Ranch Hand

Joined: Jan 04, 2006
Posts: 109
Hi,

Can anyone suggest some API's for the following:
I have a sample URL (https://confluence.cornell.edu/display/culpublic/Display+search+results+from+the+CUL+web+page+GSA+collection), where in if I send a request to the server, the server will send the xml response.
My queries are:
(1) How to send the URL request by code (Not by servlets, but by core java)
(2) How to retrieve the XML data sent by the server in an object.

Regards,
Kiran.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12681
    
    5
In the standard Java library we have the java.net package for doing this kind of thing. If your request succeeds you will get your XML as a InputStream suitable for parsing.

Bill

Java Resources at www.wbrogden.com
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to send the request and retrieve response
 
Similar Threads
How and where to use xml
Data transfer between Servlet and JSP
Do I need a separate Web Client?
send SOAP Request without Response
Servlet & XML Request-Response