<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi,<div><br></div><div>the OpenLayers WFS GetCapabilities parser provides this info, but the GeoExt reader is only interested in the feature types, not the service metadata.</div><div><br></div><div>You can do a similar thing as what is done here:</div><div><br></div><div><a href="https://github.com/opengeo/gxp/blob/master/src/script/plugins/WMSSource.js#L37">https://github.com/opengeo/gxp/blob/master/src/script/plugins/WMSSource.js#L37</a></div><div><br></div><div>Best regards,</div><div>Bart</div><div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px; "><div>-- <br>Bart van den Eijnden<br>OpenGeo - <a href="http://opengeo.org/">http://opengeo.org</a><br>Expert service straight from the developers.</div><div><br></div></span><br class="Apple-interchange-newline">
</div>
<br><div><div>On Oct 23, 2012, at 11:34 AM, Christopher Eykamp <<a href="mailto:christopher.eykamp@tudor.lu">christopher.eykamp@tudor.lu</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
<div 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>
</div>
_______________________________________________<br>Users mailing list<br><a href="mailto:Users@geoext.org">Users@geoext.org</a><br>http://www.geoext.org/cgi-bin/mailman/listinfo/users<br></blockquote></div><br></div></body></html>