Contents |
x-Soap
- Module: x-Soap
- Version: 3.0.1
- Author: Simon Roberts Wishcraft
- Compatible: All Versions - 2.0.x - 2.3.x
- Download: xoops2_xsoap_3.0.zip
- Source Forge: X-Soap
ZIP CRC - xoops2_xsoap_3.0.zip
- MD5: 2e273e7ee117a1e43bf4647d695a4201
- SHA1: a7b49fbeeb18cc57b8980655d3834246afed132d
- RIPEMD160: 85e44bae2401a83da7123a180887249cd63c3229
- CRC32: 7afad8eb
- Date: 12 - May - 2008 08:26 AEST
ZIP CRC - xoops2_xsoap_2.3.zip
- MD5: c737c805fa504d76f14be151cd39a26c
- SHA1: 5f927000c1ac49f670c99788ad13d176d77b0f92
- RIPEMD160: a9a500577f2578216c51111c6086b4434593bc4e
- CRC32: c6274d42
- Date: 15 - March - 2008 16:45 AEST
ZIP CRC - xoops2_xsoap_1.1.zip
- MD5: 1ae58640c3dad74c0cd7ee2ff72c42a1
- SHA1: 9560b646dbdd94a3d6f87838630812b8796c1a86
- RIPEMD160: a65ebe28c6c4f8c033bfcb8e977dbe7f804b8525
- CRC32: 12800d76
Release notes
x-Soap is an extension library for XOOPS, it is a soap server that is design to have a secure syndication method for customised crons and systems integration. You can share any part of your xoops database securely with x-soap including post, retrieve and update.
Help System will be written for this module, you can securely and safely sydnicate databases within the XOOPS environment with any soap compatible system.
X-Soap is a complete self contained API! As an application interface is comes with a basic record submission, updating and retrieving functions, but you can always add your own functions or even functions within xoops to server.php in the /include/ path.
You can syndicate with other xoops systems, by witting a cron for the system to run in soap between yours and other applications!! Even another xoops soap server. Share user Authentication with another service or forums topics, some post and comments what ever you wish to do with this api.
You can have Xoops share authentication with a .NET Application or a delphi or cobol main frame, whichever you want to connect to via XML SOAP transport layer.
Which ever you please, this is an advance module we offer limited Support!
Topics of Interest
Patches
Authentication Patches
- AuthFactory Patch + Authentication Plugin 181Kbs (09-MAY-2008) - auth-xsoap.zip - md5:1fd525217bd3f59e31ff174086fe5f44
Plugins
Writing a Plug-in
Functional Rules
- Must appear in the /modules/xsoap/plugins/ Folder path
- Additional PHP files for Script MUST appear on /modules/xsoap/plugins/Function_name/
- Key Function must be the same as filename
- Function must be tested before loading onto the API so no parsing error occur
- Function must end in .php & have the same name as the primary function
File Structure
The following example is how you would lay out a soap plug in called get_threads
Example (get_threads.php):
<?
/* This function is the one called when the soap function is spawning the XSD component of the wsdl
XML document.. must be called function_xsd and return an array as described, when an item contains
multiple levels this is embedded using an 'items' element in the array which contains data and the
element object name which must be unique.. this is the objname array element contained within an array['items']
*/
function get_threads_xsd(){
$xsd = array();
$i=0;
$data = array();
$data[] = array("name" => "username", "type" => "string");
$data[] = array("name" => "password", "type" => "string");
$xsd['request'][$i]['items']['data'] = $data;
$xsd['request'][$i]['items']['objname'] = 'var';
$xsd['request'][$i++] = array("name" => "data1", "type" => "string");
$xsd['request'][$i++] = array("name" => "data2", "type" => "string");
$i=0;
$xsd['response'][$i] = array("name" => "ERRNUM", "type" => "integer");
$data = array();
$data[] = array("name" => "element1", "type" => "integer");
$data[] = array("name" => "element2", "type" => "string");
$data[] = array("name" => "element3", "type" => "string");
$data[] = array("name" => "element4", "type" => "string");
$i++;
$xsd['response'][$i]['items']['data'] = $data;
$xsd['response'][$i]['items']['objname'] = 'RESULT';
return $xsd;
}
/* This function is the one called when the soap function is spawning the WSDL binding & porttype component
of the wsdl XML document.. must be called function_wsdl and return an array as described, when an item contains
multiple levels this is embedded using an 'items' element in the array which contains data and the
element object name which must be unique.. this is the objname array element contained within an array['items']
NOTE: Still in planning!!!
*/
function get_threads_wsdl(){
}
/* This function is the one called when the soap function is spawning the WSDL services component
of the wsdl XML document.. must be called function_wsdl_service and return an array as described,
when an item contains multiple levels this is embedded using an 'items' element in the array which
contains data and the element object name which must be unique.. this is the objname array element
contained within an array['items']
NOTE: Still in planning!!!
*/
function get_threads_wsdl_service(){
}
/* This function is the one called when the soap function is called via whatever client is using
soap.. A function must always have the variables $username & $password at the begin as the example as a grouped array.
you can handle the request data either in a block array or in individual variables
Everything must appart from the call function appear in a class in the same file.
*/
function get_threads($var, {$data1, $data2, ...}){
// Required 1 - This routine must appear at the top of the function otherwise you are introducing a security issue.
global $xoopsModuleConfig;
if ($xoopsModuleConfig['site_user_auth']==1){
if (!checkright(basename(__FILE__),$var['username'],$var['password']))
return array('ErrNum'=> 9, "ErrDesc" => 'No Permission for plug-in');
}
// End Required 1
// Subjective example follows here
$thread = new threadsHandler()
// Always must return in an array ie. Array("FOO" => 1, "BAR" =>2)
return $thread->foo($data1, $data2);
}
class threadsHandler {
function __construct($bar){
}
function foo($data1, $data2, ...){
// Function goes here
}
}
?>
wdsl Schemer
tablesforpost - Function
tablesforpost is a a SOAP function that retrieves the tables that can be inserted into on the service for new data submission to the database
tablesforpost - Request
<xsoap> <username></username> <password></password> </xsoap>
tablesforpost - Response
<xsoap> <array_object_1> <id></id> <table></table> </array_object_1> <array_object_2> <id></id> <table></table> </array_object_2> ... </xsoap>
tablesforupdate - Function
tablesforupdate is a a SOAP function that retrieves the tables that can be updated on the service for data submission to the database
tablesforupdate - Request
<xsoap> <username></username> <password></password> </xsoap>
tablesforupdate - Response
<xsoap> <array_object_1> <id></id> <table></table> </array_object_1> <array_object_2> <id></id> <table></table> </array_object_2> ... </xsoap>
tablesforretrieve - Function
tablesforretrieve is a a SOAP function that retrieves the tables that can be seen on the service for data retrieval from the database
tablesforretrieve - Request
<xsoap> <username></username> <password></password> </xsoap>
tablesforretrieve - Response
<xsoap> <array_object_1> <id></id> <table></table> </array_object_1> <array_object_2> <id></id> <table></table> </array_object_2> ... </xsoap>
tableschemer - Function
tableschemer is a a SOAP function that retrieves the a tables schemer that can be seen on the service
tableschemer - Request
<xsoap> <username></username> <password></password> <update></update> <post></post> <retrieve></retrieve> <tablename></tablename> </xsoap>
tableschemer - Response
<xsoap> <array_object_1> <table_id></table_id> <field></field> <allowpost></allowpost> <allowretrieve></allowretrieve> <allowupdate></allowupdate> <string></string> <int></int> <float></float> <text></text> <other></other> <key></key> </array_object_1> <array_object_2> <table_id></table_id> <field></field> <allowpost></allowpost> <allowretrieve></allowretrieve> <allowupdate></allowupdate> <string></string> <int></int> <float></float> <text></text> <other></other> <key></key> </array_object_2> ... </xsoap>
post - Function
post is a a SOAP function that insert a record in a tables that can be posted to on the service
post - Request
<xsoap> <username></username> <password></password> <tablename></tablename> <data> <array_object_1> <field></field> <value></value> </array_object_1> <array_object_2> <field></field> <value></value> </array_object_2> ... </data> </xsoap>
post - Response
<xsoap> <insert_id></insert_id> </xsoap>
retrieve - Function
retrieve is a a SOAP function that select a record or group of records in a tables that can be retrieved off the service
retrieve - Request
<xsoap> <username></username> <password></password> <tablename></tablename> <clause></clause> <data> <array_object_1> <field></field> </array_object_1> <array_object_2> <field></field> </array_object_2> ... </data> </xsoap>
retrieve - Response
<xsoap> <total_records></total_records> <data> <record_1> <array_object_1> <field></field> <value></value> </array_object_1> <array_object_2> <field></field> <value></value> </array_object_2> ... </record_1> <record_2> <array_object_1> <field></field> <value></value> </array_object_1> <array_object_2> <field></field> <value></value> </array_object_2> ... </record_2> ... </data> </xsoap>
update - Function
update is a a SOAP function that update a record in a tables that can be posted to on the service you must have the primary key set.
update - Request
<xsoap> <username></username> <password></password> <tablename></tablename> <data> <array_object_1> <field></field> <value></value> </array_object_1> <array_object_2> <field></field> <value></value> </array_object_2> ... </data> </xsoap>
update - Response
<xsoap> <result></result> </xsoap>
retrievekeys - Function
retrievekeys is a a SOAP function that select a record or group of records in a tables that can be retrieved off the service
retrievekeys - Request
<xsoap> <username></username> <password></password> <tablename></tablename> <clause></clause> </xsoap>
retrievekeys - Response
<xsoap> <data> <record_1> <array_object_1> <field></field> <value></value> </array_object_1> <array_object_2> <field></field> <value></value> </array_object_2> ... </record_1> <record_2> <array_object_1> <field></field> <value></value> </array_object_1> <array_object_2> <field></field> <value></value> </array_object_2> ... </record_2> ... </data> </xsoap>
retrievecrc - Function
retrievecrc is a a SOAP function that select a record or group of records in a tables that can be retrieved off the service and calculates an MD5 CRC from the field selected in the admin tool for generating crc.
retrievecrc - Request
<xsoap> <username></username> <password></password> <tablename></tablename> <clause></clause> </xsoap>
retrievecrc - Response
<xsoap> <data> <record_1> <id></id> <crc></crc> <array_object_1> <field></field> <crc></crc> </array_object_1> <array_object_2> <field></field> <crc></crc> </array_object_2> ... </record_1> <record_2> <id></id> <crc></crc> <array_object_1> <field></field> <crc></crc> </array_object_1> <array_object_2> <field></field> <crc></crc> </array_object_2> ... </record_2> ... </data> </xsoap>

![[Main Page]](/modules/mediawiki/images/mediawiki.png)




