public void testUpdateSequenceSuperiorGet() throws Exception { Document dom = getAsDOM(BASEPATH + "?request=GetCapabilities&service=WCS&version=1.0.0&updateSequence=1"); // print(dom); checkOws11Exception(dom); }
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); }
@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); }
public void testSectionsBogus() throws Exception { Document dom = getAsDOM(BASEPATH + "?request=GetCapabilities&service=WCS&version=1.0.0§ion=Bogus"); checkOws11Exception(dom); assertXpathEvaluatesTo(WcsExceptionCode.InvalidParameterValue.toString(), "/ServiceExceptionReport/ServiceException/@code", dom); }
@Test public void testSectionsBogus() throws Exception { Document dom = getAsDOM( BASEPATH + "?request=GetCapabilities&service=WCS&version=1.0.0§ion=Bogus"); checkOws11Exception(dom); assertXpathEvaluatesTo( WcsExceptionCode.InvalidParameterValue.toString(), "/ServiceExceptionReport/ServiceException/@code", dom); }
@Test public void testUnsupportedVersionGet() throws Exception { Document dom = getAsDOM( BASEPATH + "?request=GetCapabilities&service=WCS&acceptVersions=9.9.9,8.8.8"); checkValidationErrors(dom, WCS11_SCHEMA); checkOws11Exception(dom); assertXpathEvaluatesTo( "VersionNegotiationFailed", "ows:ExceptionReport/ows:Exception/@exceptionCode", dom); }
@Test public void testUpdateSequenceSuperiorGet() throws Exception { long updateIndex = getGeoServer().getGlobal().getUpdateSequence() + 1; Document dom = getAsDOM( BASEPATH + "?request=GetCapabilities&service=WCS&updateSequence=" + Long.toString(updateIndex)); checkValidationErrors(dom, WCS11_SCHEMA); // print(dom); 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); }
@Test public void testSectionsBogus() throws Exception { Document dom = getAsDOM(BASEPATH + "?request=GetCapabilities&service=WCS§ions=Bogus"); checkValidationErrors(dom, WCS11_SCHEMA); checkOws11Exception(dom); assertXpathEvaluatesTo( WcsExceptionCode.InvalidParameterValue.toString(), "/ows:ExceptionReport/ows:Exception/@exceptionCode", dom); }
@Test public void testUpdateSequenceSuperiorGet() throws Exception { long i = getGeoServer().getGlobal().getUpdateSequence() + 1; Document dom = getAsDOM( BASEPATH + "?request=GetCapabilities&service=WCS&version=1.0.0&updateSequence=" + i); // print(dom); checkOws11Exception(dom); }
@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); }