Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| deegree 2.4 (2010/11/11 10:47 build-27-official)
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.deegree.enterprise.servlet
Class SOAP_1_1_FacadeServletFilter

    java.lang.Object
      org.deegree.enterprise.servlet.SOAP_1_1_FacadeServletFilter

All Implemented Interfaces:
  javax.servlet.Filter

    public class SOAP_1_1_FacadeServletFilter

extends Object
implements javax.servlet.Filter

The `SOAP_1_1_FacadeServletFilter` class is able to handle an incoming SOAP requests.

It is also able to handle multipart messages, by using the `RequestMultiPartHandler`.

Following filter-parameters are supported:

1. multipart.handler -- should denote a sub class of RequestMultipartHandler, which can be used to handle multiparts
2. error.namespace -- the default namespace of error messages, default to: http://www.opengis.net/ows
3. wsdl.location -- the location of a wsdl file which will be sent to a requesting client (GET->wsdl)
4. soap.mustUnderstand -- A comma separated list of namespace bound strings a soap service must understand e.g {http://some.namespace.org/}:CoolElement,{http://other.namespace.org/}:HotElement
5. only.except.soap -- if 'true' the service will reject all incoming request which are not soap encoded except for the get -wsdl request

Version:
  $Revision: 1.13 $, $Date: 2007-11-27 12:50:25 $
Author:
  Rutger Bezema, last edited by: $Author: poth $

Constructor Summary
`SOAP_1_1_FacadeServletFilter()`

Method Summary
`protected void` | `checkMustUnderstandAttributes(Element headerElement)` Check all direct children of the given headerElement for the mustUndertand attribute.
`void` | `destroy()`
`void` | `doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain)`
`protected XMLFragment` | `handleSOAPRequest(XMLFragment xmlReq)` Handles a SOAP 1.1. envelope request.
`void` | `init(javax.servlet.FilterConfig config)`
`protected void` | `sendException(javax.servlet.ServletResponse response, OGCWebServiceException e, boolean usingSoap)` Sends the passed `OGCWebServiceException` to the calling client and flushes/closes the writer.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SOAP_1_1_FacadeServletFilter

    public SOAP_1_1_FacadeServletFilter()

Method Detail

### init

    public void init(javax.servlet.FilterConfig config)
              throws javax.servlet.ServletException

  Specified by:
    `init` in interface `javax.servlet.Filter`
  Throws:
    `javax.servlet.ServletException`

### doFilter

    public void doFilter(javax.servlet.ServletRequest request,
                         javax.servlet.ServletResponse response,
                         javax.servlet.FilterChain chain)
                  throws IOException,
                         javax.servlet.ServletException

  Specified by:
    `doFilter` in interface `javax.servlet.Filter`
  Throws:
    `IOException`
    `javax.servlet.ServletException`

### handleSOAPRequest

    protected XMLFragment handleSOAPRequest(XMLFragment xmlReq)
                                     throws XMLParsingException,
                                            OGCWebServiceException,
                                            IllegalArgumentException

  Handles a SOAP 1.1. envelope request. The given xml-dom tree will be traversed and the content of the body will be returned.

  Parameters:
    `xmlReq` - the xml-dom representation of the original request, it should be a soap-envelope bound to the namespace: http://schemas.xmlsoap.org/soap/envelope/
  Returns:
    the contents of the soap-body never `null`
  Throws:
    `XMLParsingException` - if the body could not be parsed
    `OGCWebServiceException` - if one of the header elements was not configured to be understood.
    `IllegalArgumentException` - if the xmlReq is `null`

### checkMustUnderstandAttributes

    protected void checkMustUnderstandAttributes(Element headerElement)
                                          throws OGCWebServiceException,
                                                 XMLParsingException

  Check all direct children of the given headerElement for the mustUndertand attribute. If one is set to '1' the {namespace}:localName will be checked against the configured names. If such an Element is not configured as understandable an SOAP-Fault will be sent, as described in the soap 1.1 specification.

  Parameters:
    `headerElement` - which top-level child-nodes will be checked for mustUnderstand attributes. If `null` nothing will be done.
  Throws:
    `OGCWebServiceException` - if one of the found children was not configured to be understood.
    `XMLParsingException` - if an error occurs while retrieving the child elements of the headerelement

### destroy

    public void destroy()

  Specified by:
    `destroy` in interface `javax.servlet.Filter`

### sendException

    protected void sendException(javax.servlet.ServletResponse response,
                                 OGCWebServiceException e,
                                 boolean usingSoap)
                          throws IOException

  Sends the passed `OGCWebServiceException` to the calling client and flushes/closes the writer.

  Parameters:
    `response` - to write the exception message to.
    `e` - the exception to 'send' e.g. write to the stream.
    `usingSoap` - true if the exception should be wrapped inside a soap body.
  Throws:
    `IOException` - if an error occurred while getting the writer of the response.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| deegree 2.4 (2010/11/11 10:47 build-27-official)
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org