Все функции, доступные через SOAP

Array ( [0] => string sendSms(string $message, string $to, string $from) [1] => string getBalance() [2] => string getStatus(int $message_id) )


Запрос баланса

Ответ на запрос баланса в системе getBalance():
Balance: 194 SMS

Заголовок запроса к системе:
POST /sms_soap.php HTTP/1.1
Host: litesms.net
Connection: Keep-Alive
User-Agent: PHP-SOAP/5.2.4-2ubuntu5.3
Content-Type: text/xml; charset=utf-8
SOAPAction: ""
Content-Length: 362
Authorization: Basic MsRtaWf7R2V0TjU=


Запрос к системе:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><SOAP-ENV:getBalance/></SOAP-ENV:Body></SOAP-ENV:Envelope>

Заголовок ответа системы:
HTTP/1.1 200 OK
Date: Fri, 12 Dec 2008 14:04:37 GMT
Server: Apache/2.2.3 (CentOS)
X-Powered-By: PHP/5.1.6
Content-Length: 508
Connection: close
Content-Type: text/xml; charset=utf-8

Ответ системы:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><SOAP-ENV:getBalanceResponse><return xsi:type="xsd:string">Balance: 194 SMS</return></SOAP-ENV:getBalanceResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>




Отправка SMS

Ответ на запрос отправки SMS sendSMS("Тестовое сообщение", "1234567", "litesms"):
Error: unsupported phone number

Заголовок запроса к системе:
POST /sms_soap.php HTTP/1.1
Host: litesms.net
Connection: Keep-Alive
User-Agent: PHP-SOAP/5.2.4-2ubuntu5.3
Content-Type: text/xml; charset=utf-8
SOAPAction: ""
Content-Length: 587
Authorization: Basic MsRtaWf7R2V0TjU=


Запрос к системе:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><SOAP-ENV:sendSms><message xsi:type="xsd:string">Тестовое сообщение</message><to xsi:type="xsd:string">1234567</to><from xsi:type="xsd:string">litesms</from></SOAP-ENV:sendSms></SOAP-ENV:Body></SOAP-ENV:Envelope>

Заголовок ответа системы:
HTTP/1.1 200 OK
Date: Fri, 12 Dec 2008 14:04:37 GMT
Server: Apache/2.2.3 (CentOS)
X-Powered-By: PHP/5.1.6
Content-Length: 517
Connection: close
Content-Type: text/xml; charset=utf-8

Ответ системы:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><SOAP-ENV:sendSmsResponse><return xsi:type="xsd:string">Error: unsupported phone number</return></SOAP-ENV:sendSmsResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>




Cтатус доставки сообщения

Ответ на запрос статуса доставки SMS getStatus(40):
Error: no such message

Заголовок запроса к системе:
POST /sms_soap.php HTTP/1.1
Host: litesms.net
Connection: Keep-Alive
User-Agent: PHP-SOAP/5.2.4-2ubuntu5.3
Content-Type: text/xml; charset=utf-8
SOAPAction: ""
Content-Length: 481
Authorization: Basic MsRtaWf7R2V0TjU=


Запрос к системе:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><SOAP-ENV:getStatus><message_id xsi:type="xsd:int">40</message_id></SOAP-ENV:getStatus></SOAP-ENV:Body></SOAP-ENV:Envelope>

Заголовок ответа системы:
HTTP/1.1 200 OK
Date: Fri, 12 Dec 2008 14:04:39 GMT
Server: Apache/2.2.3 (CentOS)
X-Powered-By: PHP/5.1.6
Content-Length: 512
Connection: close
Content-Type: text/xml; charset=utf-8

Ответ системы:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><SOAP-ENV:getStatusResponse><return xsi:type="xsd:string">Error: no such message</return></SOAP-ENV:getStatusResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>