Debugging Java web processes

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Debugging Java web processes

RabButler
Hello,
I have recently been assigned some work to continue developmen on some Java 52N processes. I have followed through the instructions for building the 52N from source (building with Maven from within Java EE Eclipse Luna and following https://github.com/52North/WPS readme as a guide).

The server and web-app seem be running and I can run getcapabilities and echo processes using Tomcat as a debug server. I now want to create processes and have followed this: https://wiki.52north.org/bin/view/Geoprocessing/ExtendAbstractSelfDescribingAlgorithm
which enables creation of a process. This can be then deployed using the web console or as a jar.

However something is still not clear to me: how do I effectively debug and test the business logic of the processes? I don't want to have to redeploy via the consol or export to a jar everytime as this takes ages.

I think I am missing something in how to set up a test case which doesn't involve redeploying the process everytime I want to compile. Can anyone point me a good way to do this? I thought maybe adding main run call in the extended AbstractSelfDescribingAlgorithm but this doesn't really seem right somehow.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Debugging Java web processes

Xavier Thomas
Hello,

I got the same issue a couple of weeks ago. I have created a new module (named pixime-wps-extension) in the main project (as it is done for the sub module 52n-wps-geotools, for example). I've also created a test class inside my new module in order to test the algorithm using the WPSClient library as a true WPS client is expected to do. You can have a look to this module at https://bitbucket.org/zuncle/wps-catelin.

If you choose this way, be careful to update the POMs of the 52n-wps-parent and 52n-wps-webapp (by analogy with 52n-wps-geotools). I know that it will not be not useful for the next 52n WPS git pulls, but...

You can also have a look to this repository on GitHub: https://github.com/52North/WPS-Extension-Skeleton

You can also redirect your newly created module to a different git repository than the one used by the 52n WPS code, even if they are in same projet. To do that, I used the "git submodule" command. It is explained in the bitbucket repo.

I use IntelliJ IDEA, not Eclipse, but it should not make a difference.
Loading...