/** * Sets the {@link OwsHttpResponse} that will be returned by the next call to {@link #doGet(URL, Map, Map)} or * {@link #doPost(URL, String, StreamBufferStore, Map)}. * * @param responseBody * source of the response body, must not be <code>null</code> * @param contentType * content-type header, may be <code>null</code> * @param httpStatus * HTTP response status, usually 200 (OK) */ public void setResponse( URL responseBody, String contentType, int httpStatus ) { this.response = new OwsHttpResponseMock( responseBody, contentType, httpStatus ); } }
@Override public XMLStreamReader getAsXMLStream() throws OWSExceptionReport, XMLStreamException { return XMLInputFactory.newInstance().createXMLStreamReader( getAsBinaryStream(), "UTF-8" ); }
@Override public void assertNoXmlContentTypeAndExceptionReport() throws OWSExceptionReport, XMLStreamException { if ( "text/xml".equals( contentType ) ) { XMLStreamReader xmlStream = getAsXMLStream(); OWSExceptionReader.assertNoExceptionReport( xmlStream ); } }