Move/copy a soap server to phpgw root

This commit is contained in:
Miles Lott 2001-08-10 00:31:21 +00:00
parent d0e954b674
commit 85bb35cb2b
2 changed files with 154 additions and 0 deletions

View File

@ -0,0 +1,121 @@
<?php
$server->add_to_map(
'hello',
array('string'),
array('string')
);
function hello($serverid)
{
global $phpgw_info;
return CreateObject('soap.soapval','return','string',$phpgw_info['server']['site_title']);
}
$server->add_to_map(
"echoString",
array("string"),
array("string")
);
function echoString($inputString)
{
return CreateObject('soap.soapval',"return","string",$inputString);
}
$server->add_to_map(
"echoStringArray",
array("array"),
array("array")
);
function echoStringArray($inputStringArray)
{
return $inputStringArray;
}
$server->add_to_map(
"echoInteger",
array("int"),
array("int")
);
function echoInteger($inputInteger)
{
return $inputInteger;
}
$server->add_to_map(
"echoIntegerArray",
array("array"),
array("array")
);
function echoIntegerArray($inputIntegerArray)
{
return $inputIntegerArray;
}
$server->add_to_map(
"echoFloat",
array("float"),
array("float")
);
function echoFloat($inputFloat)
{
return $inputFloat;
}
$server->add_to_map(
"echoFloatArray",
array("array"),
array("array")
);
function echoFloatArray($inputFloatArray)
{
return $inputFloatArray;
}
$server->add_to_map(
"echoStruct",
array("SOAPStruct"),
array("SOAPStruct")
);
function echoStruct($inputStruct)
{
return $inputStruct;
}
$server->add_to_map(
"echoStructArray",
array("array"),
array("array")
);
function echoStructArray($inputStructArray)
{
return $inputStructArray;
}
$server->add_to_map(
"echoVoid",
array(),
array()
);
function echoVoid()
{
}
$server->add_to_map(
"echoBase64",
array("base64"),
array("base64")
);
function echoBase64($b_encoded)
{
return base64_encode(base64_decode($b_encoded));
}
$server->add_to_map(
"echoDate",
array("timeInstant"),
array("timeInstant")
);
function echoDate($timeInstant)
{
return $timeInstant;
}
?>

33
soap.php Normal file
View File

@ -0,0 +1,33 @@
<?php
/**************************************************************************\
* phpGroupWare - SOAP Server *
* http://www.phpgroupware.org *
* Written by Miles Lott <milosch@phpgroupware.org> *
* -------------------------------------------- *
* This program is free software; you can redistribute it and/or modify it *
* under the terms of the GNU General Public License as published by the *
* Free Software Foundation; either version 2 of the License, or (at your *
* option) any later version. *
\**************************************************************************/
/* $Id$ */
//$login = 'anonymous';
//$passwd = 'anonymous1';
$phpgw_info['flags'] = array(
'disable_Template_class' => True,
'currentapp' => 'login',
'noheader' => True
);
include('./header.inc.php');
//$sessionid = $phpgw->session->create($login,$passwd);
$server = CreateObject('phpgwapi.soap_server');
/* _debug_array($server);exit; */
include(PHPGW_API_INC . '/soaplib.soapinterop.php');
$server->service($HTTP_RAW_POST_DATA);
?>