-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathexamppleservice.php
More file actions
57 lines (49 loc) · 2.37 KB
/
examppleservice.php
File metadata and controls
57 lines (49 loc) · 2.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?php
session_start();
header("Content-Type: text/xml; charset=utf-8");
header('Cache-Control: no-store, no-cache');
header('Expires: '.date('r'));
require 'other/ImportDataEgovServiceService.php';
require 'exampleclass.php';
ini_set("soap.wsdl_cache_enabled", "0"); // отключаем кеширование WSDL-файла для тестирования
$options = ['uri' => "http://{$_SERVER['HTTP_HOST']}/examppleservice.php",
'classmap' =>
['SenderInfo' => '\SenderInfo',
'Property' => '\Property',
'MessageData' => '\MessageData',
'ErrorInfo' => '\ErrorInfo',
'DeliveryNotification' => '\DeliveryNotification',
'DeliveryStatusInfo' => '\DeliveryStatusInfo',
'MessageStatusInfo' => '\MessageStatusInfo',
'ChangeStatusNotification' => '\ChangeStatusNotification',
'StatusInfo' => '\StatusInfo',
'getMessageStatus' => '\getMessageStatus',
'getMessageStatusResponse' => '\getMessageStatusResponse',
'getMessages' => '\getMessages',
'getMessagesResponse' => '\getMessagesResponse',
'sendDeliveryNotification' => '\sendDeliveryNotification',
'sendDeliveryNotificationResponse' => '\sendDeliveryNotificationResponse',
'sendMessage' => '\sendMessage',
'sendMessageResponse' => '\sendMessageResponse',
'AsyncGetMessagesRequest' => '\AsyncGetMessagesRequest',
'AsyncGetMessagesResponse' => '\AsyncGetMessagesResponse',
'AsyncMessage' => '\AsyncMessage',
'AsyncMessageInfo' => '\AsyncMessageInfo',
'AsyncSendDeliveryNotificationRequest' => '\AsyncSendDeliveryNotificationRequest',
'AsyncSendDeliveryNotificationResponse' => '\AsyncSendDeliveryNotificationResponse',
'AsyncGetMessageStatusRequest' => '\AsyncGetMessageStatusRequest',
'AsyncGetMessageStatusResponse' => '\AsyncGetMessageStatusResponse',
'AsyncSendMessageRequest' => '\AsyncSendMessageRequest',
'AsyncSendMessageResponse' => '\AsyncSendMessageResponse',
'AsyncChangeStatusNotifyResponse' => '\AsyncChangeStatusNotifyResponse',
'AsyncChangeStatusNotifyRequest' => '\AsyncChangeStatusNotifyRequest']
];
$server = new SoapServer(null, $options);
$server->setClass('TestSoapServer');
$server->setPersistence(SOAP_PERSISTENCE_SESSION);
ob_start();
$server->handle();
$out1 = ob_get_contents();
$out1 = preg_replace("/<[\/]*return.*?>/", '', $out1);
ob_end_clean();
echo($out1);