1

I want to get in touch with the geoserver source code and my first task would be to create a new request for WMS. I already set up the geoserver source code in eclipse.

So when using this URL to get the capabilities:
http://localhost:8080/geoserver/wms?REQUEST=GetCapabilities

I want to get the same capabilities but for another URL:
http://localhost:8080/geoserver/wms?REQUEST=GetSomething

So how do I change the request keywords in the source code. Someone has some hints about that? I try to understand this complex source code so I will be happy about any help.

2

Adding a new request method is not that easy, you have to break the WebMapService interface and create a new method in it, and in the implementation. Not pluggable, you'd be creating a fork of GeoServer going down that road.

0

I would say that forget your idea about implementing a new WMS request. The WMS standard gives a list of valid requests and for all the other values of &request= the service must throw an exception. I am sure that you should make more changes into the GeoServer source code for making your fake request type to pass the validation. I am sure that you can come up with some better idea. Excerpts from WMS 1.1.1 standard:

6.5.2 REQUEST The REQUEST parameter indicates which service operation is being invoked. The value shall be the name of one of the operations offered by the OGC Web Service Instance.

...

Upon receiving a request that is invalid according to the relevant OGC Web Services specification, the service shall issue a Service Exception Report as defined here and in Annex A.3. The Report is meant to describe to the client application or its human user the reason(s) that the request is invalid.

  • 2
    Except that specification profiles (unforeseen at the time of spec writing) routinely add new requests to the protocol (e..g, see the SLD 1.0 extensions to the WMS 1.0 standard, which GeoServer implements partially, adding DescribeLayer, GetStyles, GetLegendGraphics and PutStyles, the last one ). – Andrea Aime Oct 3 '15 at 20:37
  • yes it seems hard but it's the task i have to work on and I get money for so no way to change that idea ;). – Andrej Oct 4 '15 at 12:39
  • Happy working with the challenge. I trust that you have a reason for not to introduce some new vendor option or to make a WPS process. – user30184 Oct 4 '15 at 13:38
  • Andrej, if it's contracted, do you just have to deliver the change as a forked version, or also to contribute it back to the community? Cause if it's the latter, I urge you to subscribe to the devel list and describe what you want to do, the community might as well refuse your changes otherwise- – Andrea Aime Oct 5 '15 at 8:15
0

Forget about it, geoserver just provides only their regulation parameters to process the request from client, and you can not put your own request method from WMS Url. But you can put your own parameter then use it in java code for another purpose that is not relate to geosever structor

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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