public void testUpdateSequenceSuperiorPost() throws Exception { String request = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" + "<wcs:GetCapabilities service=\"WCS\" xmlns:ows=\"http://www.opengis.net/ows/1.1\"" + " xmlns:wcs=\"http://www.opengis.net/wcs\"" + " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"" + " updateSequence=\"1\" version=\"1.0.0\"/>"; Document dom = postAsDOM(BASEPATH, request); checkOws11Exception(dom); }
public void testPostBasic() throws Exception { String request = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" + "<wcs:GetCapabilities service=\"WCS\" xmlns:ows=\"http://www.opengis.net/ows/1.1\" " + "xmlns:wcs=\"http://www.opengis.net/wcs\" " + "xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"/>"; Document dom = postAsDOM(BASEPATH, request); // print(dom); checkValidationErrors(dom, WCS10_GETCAPABILITIES_SCHEMA); }
@Test public void testSupportedVersionPost() throws Exception { String request = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" + "<wcs:GetCapabilities service=\"WCS\" xmlns:ows=\"http://www.opengis.net/ows/1.1\"" + " xmlns:wcs=\"http://www.opengis.net/wcs/1.1.1\"" + " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">" + " <ows:AcceptVersions>" // + " <ows:Version>0.5.0</ows:Version>" // + " <ows:Version>1.1.1</ows:Version>" // + " </ows:AcceptVersions>" // + "</wcs:GetCapabilities>"; Document dom = postAsDOM(BASEPATH, request); assertEquals("wcs:Capabilities", dom.getFirstChild().getNodeName()); }
@Test public void testUpdateSequenceInferiorPost() throws Exception { String request = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" + "<wcs:GetCapabilities service=\"WCS\" xmlns:ows=\"http://www.opengis.net/ows/1.1\"" + " xmlns:wcs=\"http://www.opengis.net/wcs/1.1.1\"" + " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"" + " updateSequence=\"-1\"/>"; Document dom = postAsDOM(BASEPATH, request); checkValidationErrors(dom, WCS11_SCHEMA); final Node root = dom.getFirstChild(); assertEquals("wcs:Capabilities", root.getNodeName()); assertTrue(root.getChildNodes().getLength() > 0); }
public void testUpdateSequenceEqualsPost() throws Exception { String request = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" + "<wcs:GetCapabilities service=\"WCS\" xmlns:ows=\"http://www.opengis.net/ows/1.1\"" + " xmlns:wcs=\"http://www.opengis.net/wcs\"" + " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"" + " updateSequence=\"0\"/>"; Document dom = postAsDOM(BASEPATH, request); // print(dom); final Node root = dom.getFirstChild(); assertEquals("ServiceExceptionReport", root.getNodeName()); assertEquals("CurrentUpdateSequence", root.getFirstChild().getNextSibling().getAttributes() .getNamedItem("code").getNodeValue()); }
public void testUpdateSequenceInferiorPost() throws Exception { String request = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" + "<wcs:GetCapabilities service=\"WCS\" xmlns:ows=\"http://www.opengis.net/ows/1.1\"" + " xmlns:wcs=\"http://www.opengis.net/wcs\"" + " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"" + " updateSequence=\"-1\"/>"; Document dom = postAsDOM(BASEPATH, request); checkValidationErrors(dom, WCS10_GETCAPABILITIES_SCHEMA); final Node root = dom.getFirstChild(); assertEquals("wcs:WCS_Capabilities", root.getNodeName()); assertTrue(root.getChildNodes().getLength() > 0); }
@Test public void testPostBasic() throws Exception { String request = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" + "<wcs:GetCapabilities service=\"WCS\" xmlns:ows=\"http://www.opengis.net/ows/1.1\" " + "xmlns:wcs=\"http://www.opengis.net/wcs/1.1.1\" " + "xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"/>"; Document dom = postAsDOM(BASEPATH, request); // print(dom); checkValidationErrors(dom, WCS11_SCHEMA); }
@Test public void testPostBasic() throws Exception { String request = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" + "<wcs:GetCapabilities service=\"WCS\" xmlns:ows=\"http://www.opengis.net/ows/1.1\" " + "xmlns:wcs=\"http://www.opengis.net/wcs\" " + "xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"/>"; Document dom = postAsDOM(BASEPATH, request); // print(dom); checkValidationErrors(dom, WCS10_GETCAPABILITIES_SCHEMA); }
@Test public void testUpdateSequenceEqualsPost() throws Exception { long updateIndex = getGeoServer().getGlobal().getUpdateSequence(); String request = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" + "<wcs:GetCapabilities service=\"WCS\" xmlns:ows=\"http://www.opengis.net/ows/1.1\"" + " xmlns:wcs=\"http://www.opengis.net/wcs/1.1.1\"" + " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"" + " updateSequence=\"" + Long.toString(updateIndex) + "\"/>"; Document dom = postAsDOM(BASEPATH, request); checkValidationErrors(dom, WCS11_SCHEMA); final Node root = dom.getFirstChild(); assertEquals("wcs:Capabilities", root.getNodeName()); assertEquals(0, root.getChildNodes().getLength()); }
@Test public void testUpdateSequenceInferiorPost() throws Exception { String request = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" + "<wcs:GetCapabilities service=\"WCS\" xmlns:ows=\"http://www.opengis.net/ows/1.1\"" + " xmlns:wcs=\"http://www.opengis.net/wcs\"" + " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"" + " updateSequence=\"-1\"/>"; Document dom = postAsDOM(BASEPATH, request); checkValidationErrors(dom, WCS10_GETCAPABILITIES_SCHEMA); final Node root = dom.getFirstChild(); assertEquals("wcs:WCS_Capabilities", root.getNodeName()); assertTrue(root.getChildNodes().getLength() > 0); }
@Test public void testUnsupportedVersionPost() throws Exception { String request = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" + "<wcs:GetCapabilities service=\"WCS\" xmlns:ows=\"http://www.opengis.net/ows/1.1\"" + " xmlns:wcs=\"http://www.opengis.net/wcs/1.1.1\"" + " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">" + " <ows:AcceptVersions>" // + " <ows:Version>9.9.9</ows:Version>" // + " </ows:AcceptVersions>" // + "</wcs:GetCapabilities>"; Document dom = postAsDOM(BASEPATH, request); checkValidationErrors(dom, WCS11_SCHEMA); checkOws11Exception(dom); assertEquals("ows:ExceptionReport", dom.getFirstChild().getNodeName()); assertXpathEvaluatesTo( "VersionNegotiationFailed", "ows:ExceptionReport/ows:Exception/@exceptionCode", dom); }
@Test public void testUpdateSequenceEqualsPost() throws Exception { long i = getGeoServer().getGlobal().getUpdateSequence(); String request = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" + "<wcs:GetCapabilities service=\"WCS\" xmlns:ows=\"http://www.opengis.net/ows/1.1\"" + " xmlns:wcs=\"http://www.opengis.net/wcs\"" + " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"" + " updateSequence=\"" + i + "\"/>"; Document dom = postAsDOM(BASEPATH, request); // print(dom); final Node root = dom.getFirstChild(); assertEquals("ServiceExceptionReport", root.getNodeName()); assertEquals( "CurrentUpdateSequence", root.getFirstChild() .getNextSibling() .getAttributes() .getNamedItem("code") .getNodeValue()); }
@Test public void testUpdateSequenceSuperiorPost() throws Exception { long i = getGeoServer().getGlobal().getUpdateSequence() + 1; String request = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" + "<wcs:GetCapabilities service=\"WCS\" xmlns:ows=\"http://www.opengis.net/ows/1.1\"" + " xmlns:wcs=\"http://www.opengis.net/wcs\"" + " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"" + " updateSequence=\"" + i + "\" version=\"1.0.0\"/>"; Document dom = postAsDOM(BASEPATH, request); checkOws11Exception(dom); }
@Test public void testUpdateSequenceSuperiorPost() throws Exception { long updateIndex = getGeoServer().getGlobal().getUpdateSequence() + 1; String request = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" + "<wcs:GetCapabilities service=\"WCS\" xmlns:ows=\"http://www.opengis.net/ows/1.1\"" + " xmlns:wcs=\"http://www.opengis.net/wcs/1.1.1\"" + " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"" + " updateSequence=\"" + Long.toString(updateIndex) + "\"/>"; Document dom = postAsDOM(BASEPATH, request); checkValidationErrors(dom, WCS11_SCHEMA); // print(dom); checkOws11Exception(dom); }