Examples of ExceptionReportType


Examples of net.opengis.ows10.ExceptionReportType

            ByteArrayOutputStream trace = new ByteArrayOutputStream();
            exception.printStackTrace(new PrintStream(trace));
            e.getExceptionText().add(new String(trace.toByteArray()));
        }

        ExceptionReportType report = factory.createExceptionReportType();
        report.setVersion("1.0.0");
        report.getException().add(e);

        request.getHttpResponse().setContentType("application/xml");

        //response.setCharacterEncoding( "UTF-8" );
        OWSConfiguration configuration = new OWSConfiguration();
View Full Code Here

Examples of net.opengis.ows10.ExceptionReportType

        document = dom(xml);
        Object result = parse(OWS.EXCEPTIONREPORT);

        assertNotNull(result);
        assertTrue(result instanceof ExceptionReportType);
        ExceptionReportType er = (ExceptionReportType) result;

        assertEquals("1.0.0", er.getVersion());
        assertEquals(1, er.getException().size());
        ExceptionType ex = (ExceptionType) er.getException().get(0);
        assertEquals("InvalidParameterValue", ex.getExceptionCode());
        assertEquals("service", ex.getLocator());
        assertEquals(1, ex.getExceptionText().size());
        assertEquals("No service: ( madeUp )", ex.getExceptionText().get(0));
    }
View Full Code Here

Examples of net.opengis.ows10.ExceptionReportType

            method.releaseConnection();
        }

        // convert a service exception into an IOException if necessary
        if (response instanceof ExceptionReportType) {
            ExceptionReportType report = (ExceptionReportType) response;
            StringBuilder sb = new StringBuilder("The Unit service reported a failure: ");
            for (Iterator it = report.getException().iterator(); it.hasNext();) {
                ExceptionType et = (ExceptionType) it.next();
                for (Iterator eit = et.getExceptionText().iterator(); eit.hasNext();) {
                    String text = (String) eit.next();
                    sb.append(text);
                    if (eit.hasNext())
View Full Code Here

Examples of net.opengis.ows10.ExceptionReportType

            ByteArrayOutputStream trace = new ByteArrayOutputStream();
            exception.printStackTrace(new PrintStream(trace));
            e.getExceptionText().add(new String(trace.toByteArray()));
        }

        ExceptionReportType report = factory.createExceptionReportType();
        report.setVersion("1.0.0");
        report.getException().add(e);

        if (!request.isSOAP()) {
            //there will already be a SOAP mime type
            request.getHttpResponse().setContentType("application/xml");
        }
View Full Code Here

Examples of net.opengis.ows10.ExceptionReportType

        document = dom(xml);
        Object result = parse(OWS.EXCEPTIONREPORT);

        assertNotNull(result);
        assertTrue(result instanceof ExceptionReportType);
        ExceptionReportType er = (ExceptionReportType) result;

        assertEquals("1.0.0", er.getVersion());
        assertEquals(1, er.getException().size());
        ExceptionType ex = (ExceptionType) er.getException().get(0);
        assertEquals("InvalidParameterValue", ex.getExceptionCode());
        assertEquals("service", ex.getLocator());
        assertEquals(1, ex.getExceptionText().size());
        assertEquals("No service: ( madeUp )", ex.getExceptionText().get(0));
    }
View Full Code Here

Examples of net.opengis.ows10.ExceptionReportType

            method.releaseConnection();
        }

        // convert a service exception into an IOException if necessary
        if (response instanceof ExceptionReportType) {
            ExceptionReportType report = (ExceptionReportType) response;
            StringBuilder sb = new StringBuilder("The Unit service reported a failure: ");
            for (Iterator it = report.getException().iterator(); it.hasNext();) {
                ExceptionType et = (ExceptionType) it.next();
                for (Iterator eit = et.getExceptionText().iterator(); eit.hasNext();) {
                    String text = (String) eit.next();
                    sb.append(text);
                    if (eit.hasNext())
View Full Code Here

Examples of net.opengis.ows10.ExceptionReportType

            ByteArrayOutputStream trace = new ByteArrayOutputStream();
            exception.printStackTrace(new PrintStream(trace));
            e.getExceptionText().add(new String(trace.toByteArray()));
        }

        ExceptionReportType report = factory.createExceptionReportType();
        report.setVersion("1.0.0");
        report.getException().add(e);

        request.getHttpResponse().setContentType("application/xml");

        //response.setCharacterEncoding( "UTF-8" );
        OWSConfiguration configuration = new OWSConfiguration();
View Full Code Here

Examples of net.opengis.ows11.ExceptionReportType

     * Writes out an OWS ExceptionReport document.
     */
    public void handleServiceException(ServiceException exception, Request request) {
        Ows11Factory factory = Ows11Factory.eINSTANCE;

        ExceptionReportType report = Ows11Util.exceptionReport( exception, verboseExceptions );
       
        HttpServletResponse response = request.getHttpResponse();
        response.setContentType("application/xml");

        //response.setCharacterEncoding( "UTF-8" );
View Full Code Here

Examples of net.opengis.ows11.ExceptionReportType

            ByteArrayOutputStream trace = new ByteArrayOutputStream();
            exception.printStackTrace(new PrintStream(trace));
            e.getExceptionText().add(new String(trace.toByteArray()));
        }

        ExceptionReportType report = f.createExceptionReportType();
        report.setVersion("1.1.0");
        report.getException().add(e);
       
        return report;
    }
View Full Code Here

Examples of net.opengis.ows11.ExceptionReportType

     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public NotificationChain basicSetExceptionReport(ExceptionReportType newExceptionReport, NotificationChain msgs) {
        ExceptionReportType oldExceptionReport = exceptionReport;
        exceptionReport = newExceptionReport;
        if (eNotificationRequired()) {
            ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Wps10Package.PROCESS_FAILED_TYPE__EXCEPTION_REPORT, oldExceptionReport, newExceptionReport);
            if (msgs == null) msgs = notification; else msgs.add(notification);
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.