Ngi MapServer GetCapabilities Xml File

Topics: General Topics
Apr 30, 2010 at 12:45 PM

Does anyone has or knows how to generate this xml file for use

with wms method?

Cause the initializemap crashes if it does't get a n xml

or is there a way to bypass the GetCapabilities call.

 

 

Developer
Apr 30, 2010 at 2:05 PM
Hi, What exactly do you mean? In a normal scenario you initialize the WmsLayer with the url of the WMS. The WmsLayer then requests the capabilities from the WMS and constructs its internal wmsClient object. Where does the error occurr? Is there no capabilities returned? Is the wrong capabilities requests fired? Is there a parse error of the capabilities xml? Paul.
Apr 30, 2010 at 2:15 PM

The wms url doen't return any capabilities cause i don't know  what to return (i don't know what the server supports i asked the company to tell me so i can construct a  valid xml).

So when i select the wms procedude in the windows form example it says wrong capabilities or something like that and doen't continue.

The getMap request is implemented and working with openlayers .

If i don't use wmslayer in the code the capabilites is not called?

Developer
Apr 30, 2010 at 2:41 PM
Are you sure there is no capabilities request the OpenLayers client? Please use firebug or fiddler to see what is going on. And use SharpMap is a project reference not as a compiled assembly so you can step through it to see what goes wrong. Can you give an example of a map request to your WMS? Paul
Apr 30, 2010 at 7:11 PM

HI again paul

The map request comes ok from the sharpmap to my aspx that implements the wms server.

I have two commands GetCapabilities and GetMap the getMap returns an image jpg

But for the GetCapabilities i don't know what to return to the sharpMap request so i return nothing.

The protocol says to return an xml with various elements and values.

But i don't know what the elements must contain and that's the error i think.

Behind the wms there is a mapServe of ngi that provides the map it is only for greece i ask them what the GetCapabilities must return but

i have no answer yet.Is there some default GetCapabilities xml or something like that to supply back to the sharpMap?

Sorry for the questions but i am new to gis.

Developer
May 3, 2010 at 4:39 PM
The capabilities is a description for that specific WMS, so you cannot just generate any capabilities. A possible cause of your problem is that you did not provide the proper root url. Based on the root is constructs a GetCapabilties url. Use fiddler to find out what url is generated. First try to construct a capabilities url manually before you start testing from code. Paul
May 4, 2010 at 8:14 AM

Hi Paul found it was not the getcapabilities it was the zoom level i could see the map

changing to zoomextends show me the map.I provided a simple xml with only one layer and some basic stuff and worked.

Thanks a lot.