public class RequestRepresenter extends Object
| Constructor and Description |
|---|
RequestRepresenter()
Create a new RequestRepresenter
|
| Modifier and Type | Method and Description |
|---|---|
void |
saveToPath(Path path)
Save requests to a document at a path
|
void |
serializeRequest(org.opengis.cite.servlet.http.HttpServletRequest request)
Add the metadata from the HttpServletRequest to the XML document.
|
public RequestRepresenter()
throws TransformerConfigurationException,
ParserConfigurationException
TransformerConfigurationException - Exception if a new transformer could not be createdParserConfigurationException - Exception if new document builder could not be createdpublic void serializeRequest(org.opengis.cite.servlet.http.HttpServletRequest request)
throws IOException
<Request> element inside the root <HttpRequestSet>
as so:
<Request method="GET" https="true" queryString="?service=WMS&request=GetCapabilities" authentication="">
<Header name="Accepts">text/xml</Header>
<Header name="User-Agent">curl</Header>
<Body contentEncoding="utf-8" contentLength="0"></Body>
</Request>
There may be 0 or more Header elements. There is always a single Body element, which may have no
text content. attributes on the Request element may be empty, but should still be specified.request - Request from client to serialize as XMLIOException - Request Reader exceptionpublic void saveToPath(Path path) throws TransformerException, FileNotFoundException
path - Filesystem path to save requests documentTransformerException - Exception transforming requestsDocument to StreamFileNotFoundException - Exception if destination could not be opened for writingCopyright © 2021 Open Geospatial Consortium. All rights reserved.