Difference between revisions of "SOAP"

From Ethersex_Wiki
Jump to: navigation, search
 
Line 28: Line 28:
 
   | |            [*] SOAP backend                                        | |
 
   | |            [*] SOAP backend                                        | |
 
    
 
    
 +
 +
To make Ethersex functions available for SOAP the M4 macro ''soap_rpc'' is used.
 +
The following example is from [https://github.com/ethersex/ethersex/blob/master/services/clock/clock_soap.c services/clock/clock_soap.c]
 +
 +
  /*
 +
    -- Ethersex META --
 +
    soap_rpc(soap_rpc_time, "time")
 +
  */
  
 
== Client Code ==
 
== Client Code ==

Latest revision as of 12:03, 5 May 2014

SOAP
Status
Stable
menuconfig Protocols->SOAP (XML RPC)
Pinning no
Ecmd no
Code https://github.com/ethersex/ethersex/tree/master/protocols/soap

Ethersex supports the SOAP protocol over HTTP, which allows for easier communication of Ethersex with programs of any kind. The functions can be used directly in the program code with SOAP.

Configuration

First, the protocol needs to be enabled, and then the support for it in the embedded web server.

 | |     Protocols  --->                                                  | |
 ...
 | |         [*] SOAP (XML RPC)                                           | |
 
 
 | |     Applications  --->                                               | |
 ...
 | |         [*] HTTP Server  --->                                        | |    
 ...
 | |             [*] SOAP backend                                         | |
  

To make Ethersex functions available for SOAP the M4 macro soap_rpc is used. The following example is from services/clock/clock_soap.c

 /*
   -- Ethersex META --
   soap_rpc(soap_rpc_time, "time")
 */

Client Code

The following script can be used as a starting point for your own SOAP requests.

Links

CPAN SOAP::Lite - Perl's Web Services Toolkit

Quick Start with SOAP