Skip to content

Commit

Permalink
Updated test to count the features from the ESRI response.
Browse files Browse the repository at this point in the history
  • Loading branch information
Keshav Nangare committed Aug 7, 2018
1 parent c7b8572 commit 76e4381
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Expand Up @@ -32,8 +32,13 @@ public void buildGetMapRequest() {
protected NodeList parseFeatureMemberNodes( Document entity )
throws XPathFactoryConfigurationException, XPathExpressionException {
String xPathAbstract = "//gml:featureMember";
NodeList featureMemberList = null;
XPath xpath = createXPath();
return (NodeList) xpath.evaluate( xPathAbstract, entity, XPathConstants.NODESET );
featureMemberList = (NodeList) xpath.evaluate( xPathAbstract, entity, XPathConstants.NODESET );
if(featureMemberList == null || featureMemberList.getLength() == 0){
featureMemberList = (NodeList) xpath.evaluate( "esri:FeatureInfoResponse//esri:FIELDS", entity, XPathConstants.NODESET );
}
return featureMemberList;
}

protected XPath createXPath()
Expand Down
Expand Up @@ -24,6 +24,9 @@ private WmsNamespaces() {

/** GML */
public static final String GML = "http://www.opengis.net/gml";

/** ESRI */
public static final String ESRI = "http://www.esri.com/wms";

/** ExtendedCapabilities Namespace used for SOAP binding */
public static final String SOAPWMS = "http://schemas.deegree.org/extensions/services/wms/1.3.0";
Expand All @@ -45,6 +48,7 @@ public static NamespaceBindings withStandardBindings() {
nsBindings.addNamespaceBinding( XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI, "xsi" );
nsBindings.addNamespaceBinding( WmsNamespaces.GML, "gml" );
nsBindings.addNamespaceBinding( WmsNamespaces.SOAPWMS, "soapwms" );
nsBindings.addNamespaceBinding( WmsNamespaces.ESRI, "esri" );
return nsBindings;
}

Expand Down

0 comments on commit 76e4381

Please sign in to comment.