running_example.rst 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. .. _extensions_wps_remote_install_example:
  2. A Remote "Gdal Contour" Process Binding Example
  3. ===============================================
  4. Before continue reading this section, please be sure to have fully understood and successfully completed all the passages at sections:
  5. - :ref:`extensions_wps_remote_install_geoserver`
  6. - :ref:`extensions_wps_remote_install_xmpp`
  7. - :ref:`extensions_wps_remote_install_python`
  8. Running the Python WPS Agent
  9. ++++++++++++++++++++++++++++
  10. In order to start the RemoteWPS Python Wrapper, we need to run an instance of the ``wpsagent.py`` using the configuration files defined at section :ref:`extensions_wps_remote_install_python`
  11. .. code-block:: bash
  12. $> cd C:\work\RemoteWPS
  13. $> python wpsagent.py -r .\xmpp_data\configs\remote.config -s .\xmpp_data\configs\myservice\service.config service
  14. Few instants after the execution of the command, you should be able to see con ``invite`` message on the prompt
  15. .. figure:: images/run_example001.jpg
  16. :align: center
  17. and the ``default.GdalContour`` instance successfully connected and authenticated into the XMPP Server channels
  18. .. figure:: images/run_example002.jpg
  19. :align: center
  20. .. figure:: images/run_example003.jpg
  21. :align: center
  22. The new GeoServer WPS Process should be now available among the GeoServer Processes
  23. .. figure:: images/run_example004.jpg
  24. :align: center
  25. The GeoServer Remote Process Factory automatically creates the WPS interface for the new process, exposing through the OGC WPS Protocol the Inputs and Outputs definitions like shown in the illustration below
  26. .. figure:: images/run_example005.jpg
  27. :align: center
  28. At the Execute Request the Remote WPS Python framework starts a new thread and assigns to it the unique **execution_id** provided by GeoServer.
  29. .. figure:: images/run_example006.jpg
  30. :align: center
  31. The logs of the execution are stored into the **working directory**
  32. .. figure:: images/run_example007.jpg
  33. :align: center
  34. From the log file is possible to recognize the full command line executed by the Remote WPS Python wrapper along with the lines received through the standard output
  35. .. figure:: images/run_example008.jpg
  36. :align: center
  37. The main window shows the received XMPP messages and the actions taken accordingly
  38. .. figure:: images/run_example009.jpg
  39. :align: center
  40. .. note:: The same information can be found into the log file specified into the “logger.properties” file (see above).
  41. On GeoServer side, it is possible to follow the process execution by following the messages sent via XMPP to the GeoServer logs
  42. .. code-block:: bash
  43. $> tail -F -n 200 /storage/data/logs/geoserver.log
  44. .. figure:: images/run_example010.jpg
  45. :align: center