<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <title>Frepple / SOAP webservice module</title> <link rel='stylesheet' href='../styles.css' type='text/css' /> <!--PageHeaderFmt--> </head> <body> <div id="container"> <div id="menubar"> <div id="logo" align="center"> <br/><img src='../frepple.bmp' alt="frepple" /><br/> <a href='http://www.frepple.com/'> <strong>a Free<br/>Production Planning<br/>Library</strong> </a></div> <div id="menu"> <br/> <h3><a href='../Main/HomePage.html'>Main</a></h3> <h3><a href='../UI/Main.html'>User Manual</a></h3> <h3><a href='../Tutorial/Main.html'>Tutorial</a></h3> <h3><a href='Main.html'>Reference Manual</a></h3> <h3><a href='../Main/FAQ.html'>FAQ</a></h3> <h3><a href='../reference/index.html'>C++ API</a></h3> <br/><div> </div> </div> </div> <div id="content"> <br/> <!--PageText--> <div id='wikitext'> <p><a class='wikilink' href='../Main/HomePage.html'>Main</a> > <span class='wikitrail'><a class='wikilink' href='Main.html'>Reference Manual</a> > <a class='wikilink' href='Modules.html'>Extension modules</a> > <a class='selflink' href='ModulesWebservice.html'>SOAP webservice module</a></span> </p> <p class='vspace'>This module implements a multi-threaded SOAP webservice server.<br />Using the webservice frePPLe can make the plan information on-line accessible to other systems and users, and also receive updated information. In a <strong>Service Oriented Architecture</strong> (SOA) such data exchanges are used to build <strong>composite applications</strong>: data from different services is combined to build rich and flexible applications. </p> <p class='vspace'>Note that the module works with the frePPLe objects loaded memory. It does not persist any data in the database. See the chapter on the <a class='wikilink' href='OverviewArchitecture.html'>architecture</a> to understand the difference. </p> <p class='vspace'>The module is coded in C++ using the excellent gSOAP toolkit. FrePPLe currently provides only a basic service setup, and doesn't support any of the more advanced gSOAP functionalities, such as HTTPS/SSL, compression, HTTP cookies, SOAP Headers, HTTP basic authentication...<br />The supported SOAP operations also provide only a limited interface to the frePPLe functionality. </p> <p class='vspace'>The module enables the following new objects: </p><ul><li><a href='ModulesWebservice.html#command_webservice'>command_webservice</a> is a command to run the web service. </li></ul><div class='vspace'></div><h2>Module configuration</h2> <p>The module support the following configuration parameters: </p> <div class='vspace'></div><ul><li><strong>port</strong>:<br /> The port number used by the webservice.<br /> When left unspecified, the default port number is 6262. <div class='vspace'></div></li><li><strong>threads</strong>:<br /> Specifies the number of worker threads to create to serve requests.<br /> The default value is 10. </li></ul><p class='vspace'><a name='command_webservice' id='command_webservice'></a> </p><h2>Command command_webservice</h2> <p>This command runs the multi-threaded webservice. Since the command will wait forever for incoming connections this command should be called as the latest command in the command sequence. </p> <div class='vspace'></div> <table border='1' ><tr><td valign='top'><strong>Field</strong> </td><td valign='top'><strong>Type</strong> </td><td valign='top'><strong>Description</strong> </td></tr><tr><td valign='top'>verbose </td><td valign='top'>boolean </td><td valign='top'>When enabled the status of the service is echoed during operation.<br />The default is false. </td></tr></table> <div class='vspace'></div><h2>Example Python code</h2> <ul><li>Loading the module: </li></ul><pre> frepple.loadmodule("mod_webservice.so", port=6262, threads=10) </pre><div class='vspace'></div><ul><li>Running the webservice: </li></ul><pre> frepple.webservice() </pre> </div> <!--PageFooterFmt--> <!--HTMLFooter--> </div></div> </body> </html>