public void testWorkspaceQualified() throws Exception { String request = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n" + // "<wcs:DescribeCoverage service=\"WCS\" " + // "xmlns:ows=\"http://www.opengis.net/ows/1.1\"\r\n" + // " xmlns:wcs=\"http://www.opengis.net/wcs\"\r\n" + // " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" \r\n" + // " version=\"1.0.0\" >\r\n" + // " <wcs:Coverage>" + TASMANIA_DEM.getLocalPart() + "</wcs:Coverage>\r\n" + // "</wcs:DescribeCoverage>"; Document dom = postAsDOM("cdf/wcs", request); assertEquals("ServiceExceptionReport", dom.getDocumentElement().getNodeName()); dom = postAsDOM("wcs", request); assertEquals("wcs:CoverageDescription", dom.getDocumentElement().getNodeName()); }
public void testLayerQualified() throws Exception { String request = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n" + // "<wcs:DescribeCoverage service=\"WCS\" " + // "xmlns:ows=\"http://www.opengis.net/ows/1.1\"\r\n" + // " xmlns:wcs=\"http://www.opengis.net/wcs\"\r\n" + // " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" \r\n" + // " version=\"1.0.0\" >\r\n" + // " <wcs:Coverage>" + TASMANIA_DEM.getLocalPart() + "</wcs:Coverage>\r\n" + // "</wcs:DescribeCoverage>"; Document dom = postAsDOM("wcs/World/wcs", request); assertEquals("ServiceExceptionReport", dom.getDocumentElement().getNodeName()); dom = postAsDOM("wcs/DEM/wcs", request); assertEquals("wcs:CoverageDescription", dom.getDocumentElement().getNodeName()); }
@Test public void testLayerQualified() throws Exception { String request = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n" + // "<wcs:DescribeCoverage service=\"WCS\" " + // "xmlns:ows=\"http://www.opengis.net/ows/1.1\"\r\n" + // " xmlns:wcs=\"http://www.opengis.net/wcs\"\r\n" + // " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" \r\n" + // " version=\"1.0.0\" >\r\n" + // " <wcs:Coverage>" + TASMANIA_DEM.getLocalPart() + "</wcs:Coverage>\r\n" + // "</wcs:DescribeCoverage>"; Document dom = postAsDOM("wcs/World/wcs", request); assertEquals("ServiceExceptionReport", dom.getDocumentElement().getNodeName()); dom = postAsDOM("wcs/DEM/wcs", request); assertEquals("wcs:CoverageDescription", dom.getDocumentElement().getNodeName()); }
@Test public void testWorkspaceQualified() throws Exception { String request = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n" + // "<wcs:DescribeCoverage service=\"WCS\" " + // "xmlns:ows=\"http://www.opengis.net/ows/1.1\"\r\n" + // " xmlns:wcs=\"http://www.opengis.net/wcs\"\r\n" + // " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" \r\n" + // " version=\"1.0.0\" >\r\n" + // " <wcs:Coverage>" + TASMANIA_DEM.getLocalPart() + "</wcs:Coverage>\r\n" + // "</wcs:DescribeCoverage>"; Document dom = postAsDOM("cdf/wcs", request); assertEquals("ServiceExceptionReport", dom.getDocumentElement().getNodeName()); dom = postAsDOM("wcs", request); assertEquals("wcs:CoverageDescription", dom.getDocumentElement().getNodeName()); }
@Test public void testDescribeUnknownCoverageXml() throws Exception { List<Exception> errors = new ArrayList<Exception>(); String request = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n" + // "<wcs:DescribeCoverage service=\"WCS\" " + // "xmlns:ows=\"http://www.opengis.net/ows/1.1\"\r\n" + // " xmlns:wcs=\"http://www.opengis.net/wcs/1.1.1\"\r\n" + // " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" \r\n" + // " version=\"1.1.1\" >\r\n" + // " <wcs:Identifier>plop</wcs:Identifier>\r\n" + // "</wcs:DescribeCoverage>"; Document dom = postAsDOM(BASEPATH, request, errors); // print(dom); checkOws11Exception(dom); Element element = (Element) dom.getElementsByTagName("ows:Exception").item(0); assertEquals("InvalidParameterValue", element.getAttribute("exceptionCode")); assertEquals("identifiers", element.getAttribute("locator")); assertTrue(element.getTextContent().contains("plop")); }
public void testDescribeUnknownCoverageXml() throws Exception { List<Exception> errors = new ArrayList<Exception>(); String request = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n" + // "<wcs:DescribeCoverage service=\"WCS\" " + // "xmlns:ows=\"http://www.opengis.net/ows/1.1\"\r\n" + // " xmlns:wcs=\"http://www.opengis.net/wcs\"\r\n" + // " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" \r\n" + // " version=\"1.0.0\" >\r\n" + // " <wcs:Coverage>plop</wcs:Coverage>\r\n" + // "</wcs:DescribeCoverage>"; Document dom = postAsDOM(BASEPATH, request, errors); // print(dom); checkOws11Exception(dom); Element element = (Element) dom.getElementsByTagName("ServiceException").item(0); assertEquals("InvalidParameterValue", element.getAttribute("code")); assertEquals("coverage", element.getAttribute("locator")); assertTrue(element.getTextContent().contains("plop")); }
public void testDescribeDemCoverageXml() throws Exception { List<Exception> errors = new ArrayList<Exception>(); String request = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n" + // "<wcs:DescribeCoverage service=\"WCS\" " + // "xmlns:ows=\"http://www.opengis.net/ows/1.1\"\r\n" + // " xmlns:wcs=\"http://www.opengis.net/wcs\"\r\n" + // " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" \r\n" + // " version=\"1.0.0\" >\r\n" + // " <wcs:Coverage>" + getLayerId(TASMANIA_DEM) + "</wcs:Coverage>\r\n" + // "</wcs:DescribeCoverage>"; Document dom = postAsDOM(BASEPATH, request, errors); checkValidationErrors(dom, WCS10_DESCRIBECOVERAGE_SCHEMA); checkDemCoverageDescription(dom); }
@Test public void testDescribeUnknownCoverageXml() throws Exception { List<Exception> errors = new ArrayList<Exception>(); String request = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n" + // "<wcs:DescribeCoverage service=\"WCS\" " + // "xmlns:ows=\"http://www.opengis.net/ows/1.1\"\r\n" + // " xmlns:wcs=\"http://www.opengis.net/wcs\"\r\n" + // " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" \r\n" + // " version=\"1.0.0\" >\r\n" + // " <wcs:Coverage>plop</wcs:Coverage>\r\n" + // "</wcs:DescribeCoverage>"; Document dom = postAsDOM(BASEPATH, request, errors); // print(dom); checkOws11Exception(dom); Element element = (Element) dom.getElementsByTagName("ServiceException").item(0); assertEquals("InvalidParameterValue", element.getAttribute("code")); assertEquals("coverage", element.getAttribute("locator")); assertTrue(element.getTextContent().contains("plop")); }
@Test public void testDescribeDemCoverageXml() throws Exception { List<Exception> errors = new ArrayList<Exception>(); String request = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n" + // "<wcs:DescribeCoverage service=\"WCS\" " + // "xmlns:ows=\"http://www.opengis.net/ows/1.1\"\r\n" + // " xmlns:wcs=\"http://www.opengis.net/wcs/1.1.1\"\r\n" + // " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" \r\n" + // " version=\"1.1.1\" >\r\n" + // " <wcs:Identifier>" + getLayerId(TASMANIA_DEM) + "</wcs:Identifier>\r\n" + // "</wcs:DescribeCoverage>"; Document dom = postAsDOM(BASEPATH, request, errors); checkValidationErrors(dom, WCS11_SCHEMA); checkDemCoverageDescription(dom); }
@Test public void testDescribeDemCoverageXml() throws Exception { List<Exception> errors = new ArrayList<Exception>(); String request = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n" + // "<wcs:DescribeCoverage service=\"WCS\" " + // "xmlns:ows=\"http://www.opengis.net/ows/1.1\"\r\n" + // " xmlns:wcs=\"http://www.opengis.net/wcs\"\r\n" + // " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" \r\n" + // " version=\"1.0.0\" >\r\n" + // " <wcs:Coverage>" + getLayerId(TASMANIA_DEM) + "</wcs:Coverage>\r\n" + // "</wcs:DescribeCoverage>"; Document dom = postAsDOM(BASEPATH, request, errors); checkValidationErrors(dom, WCS10_DESCRIBECOVERAGE_SCHEMA); checkDemCoverageDescription(dom); }