Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I wanna teke capabilities from tomcat's geoserver. Use this.

wms = new OpenLayers.Format.WMSCapabilities();
    success: function(e){
        var response = wms.read(e.responseText);
var capability = response.capability;
for (var i=0, len=capability.layers.length; i<len; i+=1) {
    var layerObj = capability.layers[i];
    if (layerObj.name === 'filedata') {

But firebug says that "capability is not defined" in this string

for (var i=0, len=capability.layers.length; i<len; i+=1) {

If i write url from capability request in browser get error

XML Parsing Error: XML or text declaration not at start of entity
Adress: http://localhost:8080/geoserver/wms/filedata?request=GetCapabilities
Line number 5091, column 21:          <Abstract><?xml version="1.0" encoding="UTF- 8"?>
<ServiceExceptionReport version="1.3.0" xmlns="http://www.opengis.net/ogc" 
xsi:schemaLocation="http://www.opengis.net/ogc http://localhost:8080/
geoserver/schemas/wms/1.3.0/exceptions_1_3_0.xsd">   <ServiceException>

But if look in firebut that can see that application was geted capabilities.

In standalone Geoserver all work fine.

share|improve this question
can you try to get your localhost:8080/geoserver. is it ok? or is there any error? –  Aragon May 22 '12 at 7:17
yes, i can see Geoserver on this url, its ok. –  Kliver Max May 22 '12 at 7:43

1 Answer 1

up vote 3 down vote accepted

Service parameter is mandatory for making requests to WMS services. Your URL should looks like:

share|improve this answer
it not work too. –  Kliver Max May 22 '12 at 7:50
I find the error. If someone interest. Problem was in one of tomcat's geoserver standart layer. In capabilities was error text. javax.xml.transform.TransformerExeption: Translator error Translator error Error occurred trying to write out metadata for layer: Pk50095 Unable to acquire a reader for this coverage with format: WorldImage Have no idea why it happening. But when im delete this layer all start work fine. Tnx for your answers. –  Kliver Max May 22 '12 at 8:17
It's a known issue: jira.codehaus.org/browse/GEOS-4544 –  unicoletti May 22 '12 at 9:51

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.