It is really important to adhere to the following workflow:
If anything goes wrong a ServiceException can be thrown and will be written to the output stream instead.
This is because we have to be sure that no exception have been produced before setting the response's content type, so we can set the exception specific content type; and that Response.getContentType is called AFTER Response.execute, since the MIME type can depend on any request parameter or another kind of desission making during the execute process. (i.e. FORMAT in WMS GetMap)
TODO: We need to call Response.abort() if anything goes wrong to allow the Response a chance to cleanup after itself.
@author Gabriel Rold?n @author Chris Holmes @author Jody Garnett, Refractions Research @version $Id: AbstractService.java 11475 2009-02-28 18:41:23Z jdeolive $
|
|