52North / WPS

**DEPRECATED** The 52°North Web Processing Service enables the deployment of geo-processes on the web in a standardized way.
GNU General Public License v2.0
63 stars 55 forks source link

Load service endpoints via Spring #122

Open nuest opened 10 years ago

nuest commented 10 years ago

To allow other modules than 52n-wps-service to define web service endpoints (see #84 #76) we need a more flexible loading mechanism. Since the upcoming admin app uses Spring, this mechanism should also use Spring (and we throw away code from #84).

Steps:

  1. Configure existing web services via Spring
    • WebProcessingService
    • RetrieveResultServlet
  2. Create example endpoint (e.g. based on https://github.com/nuest/WPS/blob/bbae347370c32fb23e12cf50275d2048dbb42544/52n-wps-r/src/main/java/org/n52/wps/server/r/RResource.java)
  3. Create documentation about creating new endpoints

@bpross-52n starts with these steps 1 and 2 (potentially consulted by @autermann) and @nuest takes over to actually implement the requirements for WPS4R

bpross-52n commented 10 years ago

I created a branch where I added an applicationContext file defining three beans for the wpsServlet, the retrieveResultServlet and and an example RResource class: https://github.com/bpross-52n/WPS/tree/use-spring-for-servlet-config. I am afraid, the resource class, i.e. the URLs don't seem to be available. I tried a few things but had no luck. @nuest Do you want to take another look? Maybe I missed something.

nuest commented 10 years ago

I'll try my luck.

nuest commented 10 years ago

@bpross-52n Do integration tests work for you?

nuest commented 10 years ago

I made some progress, feedback and testing welcome: https://github.com/nuest/WPS/tree/feature/use-spring-for-servlet-config

Open tasks:

nuest commented 10 years ago

I also implemented a method to have an ITransactionalAlgorithmRepository managed by Spring, see https://github.com/nuest/WPS/tree/8869a4f3f93e04ed6a74ab0c5ac5d661e45dba3d/52n-wps-r/src/main/java/org/n52/wps/server/spring and example configuration:

<Repository name="RAlgorithmRepository" className="org.n52.wps.server.spring.SpringWrapperAlgorithmRepository" active="true">
      <Property active="true" name="wrappeeName">org.n52.wps.server.r.LocalRAlgorithmRepository</Property>
    </Repository>
    <Repository name="LocalRAlgorithmRepository" className="org.n52.wps.server.r.LocalRAlgorithmRepository" active="false">
[...]

Comments welcome!