Package net.opengis.ows11

Examples of net.opengis.ows11.MetadataType


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

        ExceptionReportType exceptionResponse = response.getExceptionResponse();
        assertNull(exceptionResponse);

    }
View Full Code Here


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

        ExceptionReportType exceptionResponse = response.getExceptionResponse();
        assertNull(exceptionResponse);

    }
View Full Code Here

        assertNotNull(response);

        ExecuteResponseType executeResponse = response.getExecuteResponse();
        assertNotNull(executeResponse);

        ExceptionReportType exceptionResponse = response.getExceptionResponse();
        assertNull(exceptionResponse);

        // check result correctness
        EList outputs = executeResponse.getProcessOutputs().getOutput();
        assertTrue(!outputs.isEmpty());
View Full Code Here

        assertNotNull(response);

        // we should get a raw response, no exception, no response document
        ExecuteResponseType executeResponse = response.getExecuteResponse();
        assertNull(executeResponse);
        ExceptionReportType exceptionResponse = response.getExceptionResponse();
        assertNull(exceptionResponse);

        // check result correctness
        assertEquals("application/arcgrid", response.getRawContentType());
        BufferedReader reader = new BufferedReader(new InputStreamReader(response.getRawResponseStream()));
View Full Code Here

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

        // we should get an exception
        ExceptionReportType report = response.getExceptionResponse();
        assertNotNull(report);
        ExceptionType exception = (ExceptionType) report.getException().get(0);
        String errorMessage = exception.getExceptionText().get(0).toString();
        assertTrue(errorMessage.contains(processIdenLocal));
    }
View Full Code Here

        // 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

    }

    public static ExceptionReportType exceptionReport(
            ServiceException exception, boolean verboseExceptions) {
       
        ExceptionType e = f.createExceptionType();

        if (exception.getCode() != null) {
            e.setExceptionCode(exception.getCode());
        } else {
            //set a default
            e.setExceptionCode("NoApplicableCode");
        }

        e.setLocator(exception.getLocator());

        //add the message
        StringBuffer sb = new StringBuffer();
        OwsUtils.dumpExceptionMessages(exception, sb, true);
        e.getExceptionText().add(sb.toString());
        e.getExceptionText().addAll(exception.getExceptionText());

        if(verboseExceptions) {
            //add the entire stack trace
            //exception.
            e.getExceptionText().add("Details:");
            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);
View Full Code Here

        assertNotNull(response);

        // we should get an exception
        ExceptionReportType report = response.getExceptionResponse();
        assertNotNull(report);
        ExceptionType exception = (ExceptionType) report.getException().get(0);
        String errorMessage = exception.getExceptionText().get(0).toString();
        assertTrue(errorMessage.contains(processIdenLocal));
    }
View Full Code Here

                "</ows:AcceptVersions>" +
            "</ows:GetCapabilities>";

        buildDocument(xml);

        GetCapabilitiesType getCaps = (GetCapabilitiesType) parse();
        assertNotNull(getCaps);
       
        assertEquals( 1, getCaps.getAcceptVersions().getVersion().size() );
        assertEquals( "1.0.0", getCaps.getAcceptVersions().getVersion().get( 0 ) );
    }
View Full Code Here

            {
                Iterator<DCPType> iterator2 = next.getDCP().iterator();
                while (iterator2.hasNext())
                {
                    DCPType next2 = (DCPType) iterator2.next();
                    HTTPType http = next2.getHTTP();
                    if (getGet && !http.getGet().isEmpty())
                    {
                        RequestMethodType rmt = (RequestMethodType) http.getGet().get(0);

                        return makeURL(rmt.getHref());
                    }
                    else if (!http.getPost().isEmpty())
                    {
                        RequestMethodType rmt = (RequestMethodType) http.getPost().get(0);

                        return makeURL(rmt.getHref());
                    }
                }
View Full Code Here

TOP

Related Classes of net.opengis.ows11.MetadataType

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.