use of org.geosdi.geoplatform.xml.wfs.v110.WFSCapabilitiesType in project geo-platform by geosdi.
the class WFSGetCapabilitiesTest method testSecureV110.
@Test
public void testSecureV110() throws Exception {
WFSGetCapabilitiesRequest<WFSCapabilitiesType> request = this.secureServerConnector.createGetCapabilitiesRequest();
String responseAsString = request.formatResponseAsString(2);
logger.info("WFS_110 Secure GetCapabilities @@@@@@@@@@@@@@@@@@@@@@@ \n{}\n", responseAsString);
try (BufferedWriter writer = Files.newBufferedWriter(Paths.get("target/wfsSecureGetCapabilitiesv110.xml"))) {
writer.write(responseAsString);
}
}
use of org.geosdi.geoplatform.xml.wfs.v110.WFSCapabilitiesType in project geo-platform by geosdi.
the class WFSGetCapabilitiesTest method testHttpsGetCapabilitiesV110.
@Test
public void testHttpsGetCapabilitiesV110() throws Exception {
System.setProperty("jsse.enableSNIExtension", "false");
WFSGetCapabilitiesRequest<WFSCapabilitiesType> request = this.httpsServerConnector.createGetCapabilitiesRequest();
String responseAsString = request.formatResponseAsString(2);
logger.info("WFS_110 HTTPS GetCapabilities @@@@@@@@@@@@@@@@@@@@@@@ \n{}\n", responseAsString);
try (BufferedWriter writer = Files.newBufferedWriter(Paths.get("target/wfsSecureGetCapabilitiesv110.xml"))) {
writer.write(responseAsString);
}
}
use of org.geosdi.geoplatform.xml.wfs.v110.WFSCapabilitiesType in project ddf by codice.
the class WfsSource method configureWfsFeatures.
private void configureWfsFeatures() {
WFSCapabilitiesType capabilities = getCapabilities();
if (capabilities != null) {
wfsVersion = capabilities.getVersion();
List<FeatureTypeType> featureTypes = getFeatureTypes(capabilities);
buildFeatureFilters(featureTypes, capabilities.getFilterCapabilities());
} else {
LOGGER.debug("WfsSource {}: WFS Server did not return any capabilities.", getId());
}
}
use of org.geosdi.geoplatform.xml.wfs.v110.WFSCapabilitiesType in project ddf by codice.
the class WfsSource method getCapabilities.
private WFSCapabilitiesType getCapabilities() {
WFSCapabilitiesType capabilities = null;
Wfs wfs = factory.getClient();
try {
capabilities = wfs.getCapabilities(new GetCapabilitiesRequest());
} catch (WfsException wfse) {
LOGGER.info(WFS_ERROR_MESSAGE + " Received HTTP code '{}' from server for source with id='{}'", wfse.getHttpStatus(), getId());
LOGGER.debug(WFS_ERROR_MESSAGE, wfse);
} catch (WebApplicationException wae) {
LOGGER.debug(handleWebApplicationException(wae), wae);
} catch (Exception e) {
handleClientException(e);
}
return capabilities;
}
use of org.geosdi.geoplatform.xml.wfs.v110.WFSCapabilitiesType in project ddf by codice.
the class WfsSource method getCapabilities.
private WFSCapabilitiesType getCapabilities() {
WFSCapabilitiesType capabilities = null;
ExtendedWfs wfs = factory.getClient();
try {
capabilities = wfs.getCapabilities(new GetCapabilitiesRequest());
} catch (WfsException wfse) {
LOGGER.debug(WFS_ERROR_MESSAGE + " Received HTTP code '{}' from server for source with id='{}'", wfse.getHttpStatus(), getId(), wfse);
} catch (WebApplicationException wae) {
LOGGER.debug(handleWebApplicationException(wae), wae);
} catch (Exception e) {
handleClientException(e);
}
return capabilities;
}
Aggregations