/** * Checks if a request version can be handled by this controller (i.e. if is supported by the implementation *and* * offered by the current configuration). * <p> * NOTE: This method does use exception code {@link OWSException#INVALID_PARAMETER_VALUE}, not * {@link OWSException#VERSION_NEGOTIATION_FAILED} -- the latter should only be used for failed GetCapabilities * requests. * </p> * * @param requestedVersion * version to be checked, may be null (causes exception) * @return <code>requestedVersion</code> (if it is not null), or highest version supported * @throws OWSException * if the requested version is not available */ protected Version checkVersion( Version requestedVersion ) throws OWSException { Version version = requestedVersion; if ( requestedVersion == null ) { LOG.debug( "Assuming version: " + offeredVersions.last() ); version = offeredVersions.last(); } else if ( !offeredVersions.contains( requestedVersion ) ) { throw new OWSException( Messages.get( "CONTROLLER_UNSUPPORTED_VERSION", requestedVersion, getOfferedVersionsString() ), OWSException.INVALID_PARAMETER_VALUE ); } return version; }
@Override public void init() { OwsGlobalConfigLoader loader = workspace.getInitializable( OwsGlobalConfigLoader.class ); init( loader.getMetadataConfig(), loader.getMainConfig(), jaxbConfig ); }
/** * Called by the {@link OGCFrontController} to allow this <code>AbstractOGCServiceController</code> to handle a SOAP * request. * * @param soapDoc * <code>XMLAdapter</code> for parsing the SOAP request document * @param request * provides access to all information of the original HTTP request (NOTE: may be GET or POST) * @param response * response that is sent to the client * @param multiParts * A list of multiparts contained in the request. If the request was not a multipart request the list * will be <code>null</code>. If multiparts were found, the requestDoc will be the first (xml-lized) * {@link FileItem} in the list. * @param factory * initialized to the soap version of the request. * @throws ServletException * @throws IOException * if an IOException occurred * @throws SecurityException */ @Override public void doSOAP( SOAPEnvelope soapDoc, HttpServletRequest request, HttpResponseBuffer response, List<FileItem> multiParts, SOAPFactory factory ) throws ServletException, IOException, SecurityException { sendSOAPException( soapDoc.getHeader(), factory, response, null, null, null, "SOAP DCP is not implemented for this service.", request.getServerName(), request.getCharacterEncoding() ); }
extraHeaders.put( "SOAPAction", action ); sendException( extraHeaders, new SOAPExceptionSerializer( version, header, factory, serializer ), new SOAPException( message, faultCode, exception ), response );
super.doSOAP( soapDoc, request, response, multiParts, factory ); return;
( (AbstractOWS) ows ).sendException( null, serializer, e, res ); } else {