@Override
public void doXML( XMLStreamReader xmlStream, HttpServletRequest request, HttpResponseBuffer response,
List<FileItem> multiParts )
throws ServletException, IOException, SecurityException {
response.setContentType( "text/xml" );
try {
XMLAdapter requestDoc = new XMLAdapter( xmlStream );
OMElement rootElement = requestDoc.getRootElement();
doXML( rootElement, response );
} catch ( OWSException e ) {
LOG.debug( e.getMessage(), e );
sendServiceException( e, response );
} catch ( InvalidParameterValueException e ) {
LOG.debug( e.getMessage(), e );
sendServiceException( new OWSException( e ), response );
} catch ( MissingParameterException e ) {
LOG.debug( e.getMessage(), e );
sendServiceException( new OWSException( e ), response );
} catch ( Throwable t ) {
String msg = "An unexpected error occured: " + t.getMessage();
LOG.error( msg, t );
sendServiceException( new OWSException( msg, t, NO_APPLICABLE_CODE ), response );
}
}