| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.deegree.protocol.ows.exception.OWSExceptionReader
public class OWSExceptionReader
Reads exception report documents provided by OGC web services.
This parser is designed to be as relaxed as possible about the format of the input (in order to be able to cope with broken/invalid responses as well). Respected/tested exception report formats:
{null}ServiceExceptionReport: e.g. used by WMS 1.1.1{http://www.opengis.net/ogc}ServiceExceptionReport: e.g. used by WFS 1.0.0{http://www.opengis.net/ows}ExceptionReport: OWS 1.0.0{http://www.opengis.net/ows}ExceptionReport: OWS 1.1.0{http://www.opengis.net/ows}ExceptionReport: OWS 2.0
| Constructor Summary | |
|---|---|
OWSExceptionReader()
 | 
|
| Method Summary | |
|---|---|
static void | 
assertNoExceptionReport(org.apache.axiom.om.OMElement element)
Checks whether the given OMElement is an exception report element and causes an
 OWSExceptionReport exception (with the content of the element) if this is the case. | 
static void | 
assertNoExceptionReport(XMLStreamReader xmlStream)
Checks whether the given XMLStreamReader points to an exception report and causes an  exception (with the content of the element) if this is the case. | 
static boolean | 
isExceptionReport(QName elName)
Returns whether the given element name denotes an exception report.  | 
static OWSExceptionReport | 
parseExceptionReport(XMLStreamReader reader)
Parses the service exception report element that the given XMLStreamReader points at. | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public OWSExceptionReader()
| Method Detail | 
|---|
public static void assertNoExceptionReport(XMLStreamReader xmlStream)
                                    throws OWSExceptionReport,
                                           XMLStreamException
XMLStreamReader points to an exception report and causes an  exception (with the content of the element) if this is the case.
xml - XML stream reader, must not be null and point at a START_DOCUMENT or
            START_ELEMENT event, if the element is an exception report, it points at the
            corresponding END_ELEMENT event afterwards
OWSExceptionReport - if the reader points at an exception report
XMLStreamException
public static void assertNoExceptionReport(org.apache.axiom.om.OMElement element)
                                    throws OWSExceptionReport,
                                           XMLStreamException
OMElement is an exception report element and causes an
 OWSExceptionReport exception (with the content of the element) if this is the case.
xml - XML stream reader, must not be null and point at a START_DOCUMENT or
            START_ELEMENT event, if the element is an exception report, it points at the
            corresponding END_ELEMENT event afterwards
OWSExceptionReport - if the reader points at an exception report
XMLStreamExceptionpublic static boolean isExceptionReport(QName elName)
elName - qualified name of the potential exception report element, must not be null
true if the current element in the reader (seems to) denote an exception report,
         false otherwise
public static OWSExceptionReport parseExceptionReport(XMLStreamReader reader)
                                               throws NoSuchElementException,
                                                      XMLStreamException
XMLStreamReader points at.
 START_ELEMENT event
 END_ELEMENT event
 
reader - XML stream reader, must not be null and point at a START_ELEMENT event,
            points at the corresponding END_ELEMENT event afterwards
OWSException, never null
XMLStreamException
NoSuchElementException
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||