1 | <?php |
---|
2 | /**************************************************************************\ |
---|
3 | * phpGroupWare API - SOAP functions * |
---|
4 | * This file written by dietrich@ganx4.com * |
---|
5 | * shared functions and vars for use with soap client/server * |
---|
6 | * -------------------------------------------------------------------------* |
---|
7 | * This library is free software; you can redistribute it and/or modify it * |
---|
8 | * under the terms of the GNU Lesser General Public License as published by * |
---|
9 | * the Free Software Foundation; either version 2.1 of the License, * |
---|
10 | * or any later version. * |
---|
11 | * This library is distributed in the hope that it will be useful, but * |
---|
12 | * WITHOUT ANY WARRANTY; without even the implied warranty of * |
---|
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * |
---|
14 | * See the GNU Lesser General Public License for more details. * |
---|
15 | * You should have received a copy of the GNU Lesser General Public License * |
---|
16 | * along with this library; if not, write to the Free Software Foundation, * |
---|
17 | * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * |
---|
18 | \**************************************************************************/ |
---|
19 | |
---|
20 | |
---|
21 | $GLOBALS['server']->add_to_map( |
---|
22 | 'hello', |
---|
23 | array('string'), |
---|
24 | array('string') |
---|
25 | ); |
---|
26 | function hello($serverid) |
---|
27 | { |
---|
28 | return CreateObject('soap.soapval','return','string',$GLOBALS['phpgw_info']['server']['site_title']); |
---|
29 | } |
---|
30 | |
---|
31 | $GLOBALS['server']->add_to_map( |
---|
32 | 'echoString', |
---|
33 | array('string'), |
---|
34 | array('string') |
---|
35 | ); |
---|
36 | function echoString($inputString) |
---|
37 | { |
---|
38 | return CreateObject('soap.soapval','return','string',$inputString); |
---|
39 | } |
---|
40 | |
---|
41 | $GLOBALS['server']->add_to_map( |
---|
42 | 'echoStringArray', |
---|
43 | array('array'), |
---|
44 | array('array') |
---|
45 | ); |
---|
46 | function echoStringArray($inputStringArray) |
---|
47 | { |
---|
48 | return $inputStringArray; |
---|
49 | } |
---|
50 | |
---|
51 | $GLOBALS['server']->add_to_map( |
---|
52 | 'echoInteger', |
---|
53 | array('int'), |
---|
54 | array('int') |
---|
55 | ); |
---|
56 | function echoInteger($inputInteger) |
---|
57 | { |
---|
58 | return $inputInteger; |
---|
59 | } |
---|
60 | |
---|
61 | $GLOBALS['server']->add_to_map( |
---|
62 | 'echoIntegerArray', |
---|
63 | array('array'), |
---|
64 | array('array') |
---|
65 | ); |
---|
66 | function echoIntegerArray($inputIntegerArray) |
---|
67 | { |
---|
68 | return $inputIntegerArray; |
---|
69 | } |
---|
70 | |
---|
71 | $GLOBALS['server']->add_to_map( |
---|
72 | 'echoFloat', |
---|
73 | array('float'), |
---|
74 | array('float') |
---|
75 | ); |
---|
76 | function echoFloat($inputFloat) |
---|
77 | { |
---|
78 | return $inputFloat; |
---|
79 | } |
---|
80 | |
---|
81 | $GLOBALS['server']->add_to_map( |
---|
82 | 'echoFloatArray', |
---|
83 | array('array'), |
---|
84 | array('array') |
---|
85 | ); |
---|
86 | function echoFloatArray($inputFloatArray) |
---|
87 | { |
---|
88 | return $inputFloatArray; |
---|
89 | } |
---|
90 | |
---|
91 | $GLOBALS['server']->add_to_map( |
---|
92 | 'echoStruct', |
---|
93 | array('SOAPStruct'), |
---|
94 | array('SOAPStruct') |
---|
95 | ); |
---|
96 | function echoStruct($inputStruct) |
---|
97 | { |
---|
98 | return $inputStruct; |
---|
99 | } |
---|
100 | |
---|
101 | $GLOBALS['server']->add_to_map( |
---|
102 | 'echoStructArray', |
---|
103 | array('array'), |
---|
104 | array('array') |
---|
105 | ); |
---|
106 | function echoStructArray($inputStructArray) |
---|
107 | { |
---|
108 | return $inputStructArray; |
---|
109 | } |
---|
110 | |
---|
111 | $GLOBALS['server']->add_to_map( |
---|
112 | 'echoVoid', |
---|
113 | array(), |
---|
114 | array() |
---|
115 | ); |
---|
116 | function echoVoid() |
---|
117 | { |
---|
118 | } |
---|
119 | |
---|
120 | $GLOBALS['server']->add_to_map( |
---|
121 | 'echoBase64', |
---|
122 | array('base64'), |
---|
123 | array('base64') |
---|
124 | ); |
---|
125 | function echoBase64($b_encoded) |
---|
126 | { |
---|
127 | return base64_encode(base64_decode($b_encoded)); |
---|
128 | } |
---|
129 | |
---|
130 | $GLOBALS['server']->add_to_map( |
---|
131 | 'echoDate', |
---|
132 | array('timeInstant'), |
---|
133 | array('timeInstant') |
---|
134 | ); |
---|
135 | function echoDate($timeInstant) |
---|
136 | { |
---|
137 | return $timeInstant; |
---|
138 | } |
---|
139 | |
---|
140 | $GLOBALS['server']->add_to_map( |
---|
141 | 'system_auth', |
---|
142 | array('string','string','string'), |
---|
143 | array('array') |
---|
144 | ); |
---|
145 | |
---|
146 | $GLOBALS['server']->add_to_map( |
---|
147 | 'system_auth_verify', |
---|
148 | array('string','string','string'), |
---|
149 | array('array') |
---|
150 | ); |
---|
151 | ?> |
---|