<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
Hello!<br>
<br>
This is probably a very simple question but I just can't seem to
figure it out.<br>
<br>
I am writing a Javascript app to retrieve layer information from a
WFS server using a GetCapabilities request using GeoExt.
GetCapabilities returns information about the WFS server -- the
server's name, who runs it, etc., in addition to information on the
data layers it has on offer.<br>
<br>
My basic code looks like this:<br>
<br>
=====<br>
var store = new GeoExt.data.WFSCapabilitiesStore({ url: serverURL
});<br>
<br>
store.on('load', successFunction);<br>
store.on('exception', failureFunction);<br>
store.load();<br>
=====<br>
<br>
This works as expected, and when the loading completes,
successFunction is called.<br>
<br>
successFunction looks like this:<br>
<br>
=====<br>
successFunction = function(dataProxy, records, options) { <br>
doSomeStuff();<br>
}<br>
=====<br>
<br>
dataProxy is a Ext.data.DataProxy object, records is a list of
records, one for each layer on the WFS server, and options is empty.<br>
<br>
And here is where I'm stuck: In this function, I can get access to
all the layer information regarding data offered by the server. But
I also want to extract the server information that is contained in
the XML fetched during the store.load() (see below). I can't figure
out how to get it out of the dataProxy object, where I'm sure it
must be squirreled away.<br>
<br>
Any ideas?<br>
<br>
The fields I want are contained in this snippet:<br>
<br>
=====<br>
<ows:ServiceIdentification><br>
<ows:Title>G_WIS_testIvago</ows:Title><br>
<ows:Abstract/><br>
<ows:Keywords><br>
<ows:Keyword/><br>
</ows:Keywords><br>
<ows:ServiceType>WFS</ows:ServiceType><br>
<ows:ServiceTypeVersion>1.1.0</ows:ServiceTypeVersion><br>
<ows:Fees/><br>
<ows:AccessConstraints/><br>
=====<br>
<br>
Thank you!<br>
<br>
Chris Eykamp<br>
</body>
</html>