Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to take capabilities from tomcat's geoserver, using this code:

wms = new OpenLayers.Format.WMSCapabilities();
    success: function(e){
        var response =;
var capability = response.capability;
for (var i=0, len=capability.layers.length; i<len; i+=1) {
    var layerObj = capability.layers[i];
    if ( === '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 the url from capability request in a browser, I get the 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="" 
xsi:schemaLocation=" http://localhost:8080/
geoserver/schemas/wms/1.3.0/exceptions_1_3_0.xsd">   <ServiceException>

But if I look in firebug, I can see that application got the capabilities.

In standalone Geoserver all works 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
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: – 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.