Java Reference
In-Depth Information
}
}
This service is available from the URL
http://www.dlese.org/dds/services/
ate the
Socket
instance on the base URL of the server and then append the path to create the
URL for the POST. Then create a
BufferedWriter
to write the data of the bare HTTP request
to the server. The server generates its response, which you get off the socket's input stream
and wrap in a
BufferedReader
instance, allowing you to read the response line by line. Then
just print it to the console.
The response is lengthy, so I'll abbreviate it significantly here just to give you an idea of what
it returns:
HTTP/1.1 200 OK
Set-Cookie: UCARcwebsession=7e985be83e45b9e8baeebb58; path=/;
expires=Sun, 14-Sep-2008 21:51:42 GMT
Date: Sun, 14 Sep 2008 20:21:46 GMT
Server: Apache-Coyote/1.1
Cache-Control: max-age=0
Expires: Sun, 14 Sep 2008 20:21:46 GMT
Set-Cookie: JSESSIONID=09E46564A820483FBF30D95190B5F48C; Path=/dds
Content-Type: text/xml;charset=UTF-8
X-Cache: MISS from www.dlese.org
Connection: close
<?xml version="1.0" encoding="UTF-8" ?>
<DDSWebService xmlns="http://www.dlese.org/Metadata/ddsws"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.dlese.org/Metadata/ddsws
http://www.dlese.org/Metadata/ddsws/1-1/ddsws.xsd">
<Search>
<resultInfo>
<totalNumResults>34</totalNumResults>
<totalNumRecordsInLibrary>14494</totalNumRecordsInLibrary>
<numReturned>10</numReturned>
<offset>0</offset>
</resultInfo>
<results>
<record>...</record>
</results>
</Search>