@Override public XMLExceptionSerializer getExceptionSerializer( Version requestVersion ) { return new OWS110ExceptionReportSerializer( VERSION_100 ); }
/** * @param capabilitiesManager * handling export of capabilities, never <code>null</code> * @param exceptionsManager * used to serialize exceptions, never <code>null</code> */ public WMSController130( CapabilitiesManager capabilitiesManager, ExceptionsManager exceptionsManager ) { super( exceptionsManager ); this.capabilitiesManager = capabilitiesManager; EXCEPTION_DEFAULT = "XML"; EXCEPTION_BLANK = "BLANK"; EXCEPTION_INIMAGE = "INIMAGE"; exceptionSerializer = new PreOWSExceptionReportSerializer( EXCEPTION_MIME ); }
private XMLExceptionSerializer getDefaultExceptionSerializer() { List<String> offeredVersions = getOfferedVersions(); if ( offeredVersions.contains( VERSION_200.toString() ) ) { return new OWS110ExceptionReportSerializer( VERSION_200 ); } else if ( offeredVersions.contains( VERSION_110.toString() ) ) { return new OWS100ExceptionReportSerializer(); } return new PreOWSExceptionReportSerializer( "application/vnd.ogc.se_xml" ); }
case FAILED: writer.writeStartElement( WPS_NS, "ProcessFailed" ); OWS110ExceptionReportSerializer exceptionAdapter = new OWS110ExceptionReportSerializer( VERSION_100 ); exceptionAdapter.serializeExceptionToXML( writer, state.getFailedException() ); writer.writeEndElement(); break;
@Override public void serializeException( HttpResponseBuffer response, OWSException exception ) throws IOException, XMLStreamException { response.reset(); response.setCharacterEncoding( "UTF-8" ); response.setContentType( "application/xml" ); setExceptionStatusCode( response, exception ); serializeExceptionToXML( response.getXMLWriter(), exception ); }
@Override public void serializeException( HttpResponseBuffer response, OWSException exception ) throws IOException, XMLStreamException { response.reset(); response.setCharacterEncoding( "UTF-8" ); response.setContentType( mimeType ); setExceptionStatusCode( response, exception ); serializeExceptionToXML( response.getXMLWriter(), exception ); }
@Override public XMLExceptionSerializer getExceptionSerializer( Version requestVersion ) { return new OWS110ExceptionReportSerializer( VERSION_100 ); }
@Override public XMLExceptionSerializer getExceptionSerializer( Version requestVersion ) { XMLExceptionSerializer serializer = getDefaultExceptionSerializer(); if ( VERSION_100.equals( requestVersion ) ) { serializer = new PreOWSExceptionReportSerializer( "application/vnd.ogc.se_xml" ); } else if ( VERSION_110.equals( requestVersion ) ) { serializer = new OWS100ExceptionReportSerializer(); } else if ( VERSION_200.equals( requestVersion ) ) { serializer = new OWS110ExceptionReportSerializer( VERSION_200 ); } return serializer; }
private void sendServiceException( OWSException ex, HttpResponseBuffer response ) throws ServletException { sendException( null, new OWS110ExceptionReportSerializer( VERSION_100 ), ex, response ); }
/** * Returns the {@link ExceptionSerializer} for the given request version. * * @param requestVersion * version of the request, may be <code>null</code> (implies that the serializer for the highest * supported version shall be returned) * @return suitable XML serializer, never <code>null</code> */ public XMLExceptionSerializer getExceptionSerializer( Version requestVersion ) { return new OWS110ExceptionReportSerializer( Version.parseVersion( "1.1.0" ) ); }
private void sendException( OWSException e, HttpResponseBuffer response ) throws ServletException { sendException( null, new OWS110ExceptionReportSerializer( VERSION_100 ), e, response ); }
/** * @param e * @param response */ private void sendServiceException( OWSException e, HttpResponseBuffer response ) throws ServletException { LOG.error( "Unable to forfil request, sending exception.", e ); sendException( null, new OWS110ExceptionReportSerializer( VERSION_100 ), e, response ); }
serializer = new OWS110ExceptionReportSerializer( parseVersion( "1.1.0" ) ); } else { serializer = new OWS110ExceptionReportSerializer( requestVersion );