Package net.opengis.ows10

Examples of net.opengis.ows10.ExceptionReportType


        // response should not be null and no exception should occur.
        assertNotNull(response);

        // we should get an exception here too
        ExceptionReportType report = response.getExceptionResponse();
        assertNotNull(report);
    }
View Full Code Here


     * <!-- 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, Wfs20Package.TRUNCATED_RESPONSE_TYPE__EXCEPTION_REPORT, oldExceptionReport, newExceptionReport);
            if (msgs == null) msgs = notification; else msgs.add(notification);
        }
View Full Code Here

    }

    void setResponseFailed(ExecuteResponseType response, ServiceException reportException) {
        Wps10Factory f = Wps10Factory.eINSTANCE;
        ProcessFailedType failedType = f.createProcessFailedType();
        ExceptionReportType report = Ows11Util.exceptionReport(reportException, verboseExceptions,
                "1.1.0");
        failedType.setExceptionReport(report);
        response.getStatus().setProcessFailed(failedType);
    }
View Full Code Here

        String version = null;
        if (useServiceVersion && request.getServiceDescriptor() != null) {
            version = request.getServiceDescriptor().getVersion().toString();
        }

        ExceptionReportType report = Ows11Util.exceptionReport( exception, verboseExceptions, version );
       
        HttpServletResponse response = request.getHttpResponse();
        if (!request.isSOAP()) {
            //there will already be a SOAP mime type
            response.setContentType("application/xml");
View Full Code Here

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

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

            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

     * 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

        ExceptionType e = Ows20Factory.eINSTANCE.createExceptionType();
        e.setExceptionCode("testCode");
        e.setLocator("testLocator");
        e.setExceptionText("testText");

        ExceptionReportType report = Ows20Factory.eINSTANCE.createExceptionReportType();
        report.setVersion("2.0");
        report.getException().add(e);

        Encoder encoder = new Encoder(new OWSConfiguration());
        encoder.setIndenting(true);
        encoder.setIndentSize(2);
       
View Full Code Here

        String version = null;
        if (useServiceVersion && request.getServiceDescriptor() != null) {
            version = request.getServiceDescriptor().getVersion().toString();
        }

        ExceptionReportType report = exceptionReport( exception, verboseExceptions, version );
       
        HttpServletResponse response = request.getHttpResponse();
        if (!request.isSOAP()) {
            //there will already be a SOAP mime type
            response.setContentType("application/xml");
View Full Code Here

            sb.append(new String(trace.toByteArray()));
        }

        e.setExceptionText(sb.toString());

        ExceptionReportType report = Ows20Factory.eINSTANCE.createExceptionReportType();

        version = version != null ? version : "2.0.0";
        report.setVersion(version);
        report.getException().add(e);

        return report;
    }
View Full Code Here

TOP

Related Classes of net.opengis.ows10.ExceptionReportType

Copyright © 2018 www.massapicom. 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.