XMLRPCInputPlugin

This plugin provides an language independent interface using XML-RPC. Using this class an enduser of the SPF can push data to it using XML remote procedure calls.

A combination of collecting data with XML-RPC and in addition with Java can be realized by extending this class and calling {@link XMLRPCInputPlugin(Map)} inside the extending class.

Examples

populateData
<?xml version="1.0" encoding="UTF-8"?>
<!-- This example shows the usage of the populateData function. A boolean 
   is returned indicating the success of the call. Send this request to http://<host>:<portFromConfig>/xmlrpc 
   e.g., http://localhost:8080/xmlrpc -->
<methodCall xmlns:ex="http://ws.apache.org/xmlrpc/namespaces/extensions">
   <methodName>RPCListener.populateData</methodName>
   <params>
      <param>
         <value>
            <!-- the function takes a map (struct) as input -->
            <struct>
               <member>
                  <!-- recommended is the use of String (just <value>123</value>
                  as unix milliseconds timestamp (milliseconds from 01.01.1970; xml-rpc does not
                  specify an 8-byte integer)
                  if your timestamp does not need to be this precise
                  you can use <dateTime.iso8601> instead.

                  If no time value is used (just the members for the phenomenons) the
                  framework will use the timestamp of the arrival system time.
                   -->
                  <name>time</name>
                  <value>1286628019171</value>
               </member>
               <member>
                  <name>humidity</name>
                  <value>
                     <double>70.2</double>
                  </value>
               </member>
            </struct>
         </value>
      </param>
   </params>
</methodCall>

setStatus:
<?xml version="1.0" encoding="UTF-8"?>
<!-- This example shows the usage of the setStatus function.
A boolean is returned indicating the success of the call.
Send this request to http://<host>:<portFromConfig>/xmlrpc
e.g., http://localhost:8080/xmlrpc
 -->
<methodCall xmlns:ex="http://ws.apache.org/xmlrpc/namespaces/extensions">
   <methodName>RPCListener.setStatus</methodName>
   <params>
      <param>
         <!-- use 1 for running and 0 for not running -->
         <value>
            <i4>0</i4>
         </value>
      </param>
      <param>
         <!-- this is a status text -->
         <value>alles kaputt...</value>
      </param>
   </params>
</methodCall>

Configuration

Configuration must be done by providing a java properties file. It must be referenced as a String parameter within the configuration (see spf.properties for details or use built-in plugin discovery).


### relative or absolute path. relative paths are calculated
### from the base SPF directory
PATH_TO_PLUGIN_DESCRIPTION = config/spf/input-ifgicopter.xml

### the plugin name
PLUGIN_NAME = stationary-platform

### the XML-RPC port to use
PLUGIN_PORT = 8081

Metadata

  • Topic created by: MatthesRieke
  • Topic created on: 2012-05-22
-- MatthesRieke - 2012-05-22
Topic revision: r1 - 22 May 2012, MatthesRieke
Legal Notice | Privacy Statement


This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Wiki? Send feedback