| Author |
using a REST-based webservice
|
Johnny Gara
Ranch Hand
Joined: Mar 09, 2007
Posts: 43
|
|
What's the best way to do this? Is it a simple matter of reading the url to the WS, reading the contents as html, and then running that through a XML reader? I'm pretty new to all this so any help (best practice) would be appreciated....
|
 |
William Brogden
Author and all-around good cowpoke
Rancher
Joined: Mar 22, 2000
Posts: 12325
|
|
I gather you are trying to make a client for an existing RESTful webservice. Typically you would create a HttpURLConnection to a URL and read the response stream according the type of the return. RESTful services are not restricted to returning XML, the returned stream could be any MIME type. Surely you have some sort of documentation on what this service returns. If it returns XML you can hand the response stream to an XML parser and follow standard XML processing. Bill
|
Java Resources at www.wbrogden.com
|
 |
 |
|
|
subject: using a REST-based webservice
|
|
|