| 3 |
liveuser |
1 |
<?php
|
|
|
2 |
|
|
|
3 |
/*
|
|
|
4 |
|
|
|
5 |
QBPWCF, Quick Build PHP website Component base on Fedora Linux.
|
| 226 |
liveuser |
6 |
Copyright (C) 2014~2025 MIN ZHI, CHEN
|
| 3 |
liveuser |
7 |
|
|
|
8 |
This file is part of QBPWCF.
|
|
|
9 |
|
|
|
10 |
QBPWCF is free software: you can redistribute it and/or modify
|
|
|
11 |
it under the terms of the GNU General Public License as published by
|
|
|
12 |
the Free Software Foundation, either version 3 of the License, or
|
|
|
13 |
(at your option) any later version.
|
|
|
14 |
|
|
|
15 |
QBPWCF is distributed in the hope that it will be useful,
|
|
|
16 |
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
17 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
18 |
GNU General Public License for more details.
|
|
|
19 |
|
|
|
20 |
You should have received a copy of the GNU General Public License
|
|
|
21 |
along with QBPWCF. If not, see <http://www.gnu.org/licenses/>.
|
|
|
22 |
|
|
|
23 |
*/
|
|
|
24 |
|
|
|
25 |
/*
|
|
|
26 |
#說明:
|
|
|
27 |
#session類別的soap服務
|
|
|
28 |
*/
|
|
|
29 |
|
|
|
30 |
namespace qbpwcf;
|
|
|
31 |
|
|
|
32 |
#匯入外部套件
|
|
|
33 |
include("allInOneForSOAP.php");
|
|
|
34 |
|
|
|
35 |
#涵式說明:
|
|
|
36 |
#建立webService
|
|
|
37 |
#回傳的結果
|
|
|
38 |
#$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
|
|
|
39 |
#$reuslt["error"],執行不正常結束的錯訊息陣列.
|
|
|
40 |
#$result["function"],當前執行的函式名稱.
|
|
|
41 |
#$result["listFunctions"],為目前定義可以使用的類別與涵式,其他的結果為錯誤尋息。
|
|
|
42 |
#必填的參數:
|
|
|
43 |
#$conf["servicePhpFile"],字串,提供服務內容的php檔案的完整絕對位置,裏面要有1個名爲 $conf["serviceClassName"] 類別
|
|
|
44 |
$conf["servicePhpFile"]="session.php";
|
|
|
45 |
#$conf["serviceClassName"],字串.提供服務的類別名稱,需要在$conf["servicePhpFile"]檔案裏面有的類別,若有使用命名空間,請加上。ex: "yourNamespace\className"
|
|
|
46 |
$conf["serviceClassName"]="qbpwcf\session";
|
|
|
47 |
#參考資料:
|
|
|
48 |
#http://www.cnblogs.com/chance1/archive/2009/04/08/1431949.html
|
|
|
49 |
#http://www.php.net/manual/en/function.is-soap-fault.php
|
|
|
50 |
#http://www.php.net/manual/en/soapserver.soapserver.php
|
|
|
51 |
#http://www.php.net/manual/en/soapserver.setclass.php
|
|
|
52 |
#http://www.php.net/manual/en/soapserver.handle.php
|
|
|
53 |
$serviceCreateResult=soap::createService($conf);
|
|
|
54 |
unset($conf);
|
|
|
55 |
|
|
|
56 |
#debug
|
|
|
57 |
#var_dump($serviceCreateResult);
|
|
|
58 |
|
|
|
59 |
?>
|