SMS Gateway SOAP rozhraní je určeno pro jednoduchou komunikaci mezi klientem a SMS bránou.
Zabezpečení
Komunikace probíhá protokolem HTTPS a klient se přihlašuje certifikátem.
Protokol
Generic messaging operations and ping (PPGw)
- ping – kontrola spojení
- send – posílání SMS, typ je dán hodnotou parametru selector.
- receive – příjem doručenek a příchozích SMS (po doručení je nutné potvrzení příkazem confirm)
- confirm – potvrzení přijatých doručenek a příchozích SMS
Simple SMS sending method (SimpleSmsGw)
Poskytuje zjednodušené rozhraní pro odesílání SMS.
Push Mode
Push Mode je rozhraní pro zasílání příchozích SMS z SMS brány do zákazníkova informačního systému. Při použití této metody odpadá nutnost aktivní kontroly příchozích SMS ze strany zákazníka. Přijaté SMS jsou ihned odesílany na zákazníkovo rozhraní.
Popis parametrů
parametr | popis | výchozí hodnota |
---|---|---|
Message.baID : String | identifikace Business Application | |
Message.msgID : String | identifikace SMS | |
Request.priority : String | 1 - VIP 2 - vysoká 3 - normální | |
Sms.fromNumber : String | odchozí číslo | |
Sms.toNumber : String | cílové číslo ve formátu +420123456789 | |
Sms.reportLevel : String | ||
Sms.validityPeriod : long | počet sekund, jak dlouho se bude SMS snažit doručit příjemci | max |
Sms.protocolIdentifier: integer | identifikator SMS zprávy (0 - 255) | |
Sms.dataCodingScheme: int | data coding scheme pro binární SMS | |
Sms.header : byte[] | hlavíčka SMS | |
Sms.premiumInfo | ||
PremiumInfo.billingCode: String | ||
PremiumInfo.orderingChannel: String | ||
PremiumInfo.orderID: String | ||
Binary.Sms data | data binární SMS | |
TextSms.intruder: boolean | true - SMS se zobrazí ihned false - standardní SMS | false |
TextSms.multiPart: boolean | true - delší SMS se rozdělí na více částí, max 900 znaků false - standardní SMS, max 160 znaků | true |
TextSms.text: String | text SMS | |
Response.refBaID: String | baID potvrzované SMS | |
Response.refMsgID: String | msgID potvrzované SMS | |
Response.type: String | typ odpovědi | |
Response.code: String | návratový kód | |
Response.description: String | popis responseCode | |
Response.timestamp: DateTime | čas generování odpovědi | |
MessageContainer.selector: String | TextSms BinarySms Mms Response | |
MessageContainer.binarySms | data pro selector = BinarySms, jinak null | |
MessageContainer.mms | data pro selector = Mms, jinak null | |
MessageContainer.response | data pro selector = Response, jinak null | |
MessageContainer.textSms | data pro selector = TextSms, jinak null |
WSDL
WSDL k dispozici zde.
Návratové kódy
typ | kód | popis |
---|---|---|
APPL_ERROR | EAPP_003 | BaID neni aktivni - EAPP_003 - BaID is not active |
APPL_ERROR | EAPP_019 | Zprava zaslana po terminu platnosti zkusebniho rezimu - EAPP_019 - Trial period has expired |
APPL_ERROR | EAPP_020 | Pocet zprav ve zkusebnim rezimu vycerpan - EAPP_020 - No. of messages in trial mode exceeded |
APPL_ERROR | EAPP_023 | Prekrocen maximalni pocet zprav, ktere je mozne zaslat v jednom mesici - EAPP_023 - Maximum quota of messages per month exceeded |
APPL_ERROR | EAPP_024 | Prekrocen maximalni pocet zprav, ktere je mozne zaslat behem jednoho dne - EAPP_024 - Maximum quota of messages per day exceeded |
APPL_ERROR | EAPP_025 | Zprava potvrzovana pres pozadavek Confirm neni k dispozici - EAPP_025 - No message found for Confirm request |
APPL_ERROR | EAPP_037 | Limit zprav cekajicich na potvrzeni prijeti prekrocen - EAPP_037 - Too many messages waiting for confirmation |
APPL_ERROR | EAPP_050 | Maximalni limit soucasnych pozadavku prekrocen - EAPP_050 - Maximum number of concurrent requests exceeded |
APPL_ERROR | EAPP_051 | Nadlimitni pocet soucasnych pozadavku na potvrzeni prijeti zpravy EAPP_051 - Too many concurrent confirm requests |
APPL_ERROR | EAPP_052 | Nadlimitni pocet soucasnych pozadavku na prijeti zpravy - EAPP_052 - Too many concurrent receive requests |
APPL_ERROR | EAPP_053 | Nadlimitni pocet soucasnych pozadavku na zaslani zpravy - EAPP_053 - Too many concurrent send requests |
APPL_ERROR | EAPP_060 | Aplikace neni opravnena pouzivat cislo MSISDN v poli fromNumber - EAPP_060 - Application is not authorised to use MSISDN number in fromNumber field |
APPL_ERROR | EAPP_101 | Zprava musi byt potvrzena pres stejne rozhrani, pres jake byla prijata - EAPP_101 - Message must be confirmed via same interface through which it was received |
APPL_ERROR | EAPP_107 | Aplikace SMS Connector nemuze posilat zpravy MMS - EAPP_107 - SMS Connector application is not allowed to send MMSs |
APPL_ERROR | EAPP_109 | Aplikace SMS Connector nemuze posilat premiove zpravy - EAPP_109 - SMS Connector application is not allowed to send premium messages |
AUTHORIZATION_ERROR | EAUT_001 | Neplatny certifikat - EAUT_001 - Invalid certificate |
AUTHORIZATION_ERROR | EAUT_002 | ID neni platne nebo není autorizovano pro certifikat - EAUT_002 - BA ID not valid or not authorised for certificate |
AUTHORIZATION_ERROR | EAUT_003 | Ref BA ID neni autorizovano pro certifikat - EAUT_003 - Ref BA ID not authorised for certificate |
FORMAT_ERROR | EFMT_004 | Neplatny identifikator zpravy - EFMT_004 - Invalid message ID |
FORMAT_ERROR | EFMT_005 | Neplatna priorita zpravy - EFMT_005 - Invalid message priority |
FORMAT_ERROR | EFMT_006 | Nesoulad cisla fromNumber s BA ID - EFMT_006 - Invalid fromNumber (mismatch with BA ID) |
FORMAT_ERROR | EFMT_007 | Neplatny format MSISDN cisla prijemce - EFMT_007 - Invalid recipient MSISDN number format |
FORMAT_ERROR | EFMT_008 | Neznama hodnota pole Selector - EFMT_008 - Unknown Selector value |
FORMAT_ERROR | EFMT_009 | Prilis dlouhy sufix zpravy - EFMT_009 - Message suffix too long |
FORMAT_ERROR | EFMT_010 | Neplatny format MSISDN cisla fromNumber - EFMT_010 - Invalid MSISDN number format of fromNumber |
FORMAT_ERROR | EFMT_011 | Sufix zpravy musi byt ciselna hodnota - EFMT_011 - Message suffix must be numeric |
FORMAT_ERROR | EFMT_012 | Jen jedno z poli suffix a fromNumber muze byt vyplneno - EFMT_012 - Only one of the suffix and fromNumber fields might be filled in |
FORMAT_ERROR | EFMT_013 | Neplatna hodnota pole Report Level / Delivery Report - EFMT_013 - Invalid Report Level / Delivery Report |
FORMAT_ERROR | EFMT_016 | Neplatny format pole Validity period - EFMT-016 - Incorrect message validity format |
FORMAT_ERROR | EFMT_023 | Binarni SMS neobsahuje zadna data - EFMT_023 - No data in binary SMS |
FORMAT_ERROR | EFMT_024 | Binarni zprava je delsi nez 140 znaku - EFMT_024 - Binary message longer than 140 characters |
FORMAT_ERROR | EFMT_025 | SMS nemuze byt soucasne poslana jako multipart a intruder - EFMT_025 - SMS cannot be sent as multipart and intruder at the same time. |
FORMAT_ERROR | EFMT_026 | Nepripustna delka zpravy - EFMT_026 - Message too long |
FORMAT_ERROR | EFMT_032 | Pole BA ID je prazdne - EFMT_032 - BA ID empty |
FORMAT_ERROR | EFMT_034 | Zprava neobsahuje zadny text - EFMT_034 – Text message empty |
FORMAT_ERROR | EFMT_035 | Neplatny pozadavek - EFMT_035 - Bad Request |
FORMAT_ERROR | EFMT_101 | Neplatna hodnota pole Intruder - EFMT_101 - Invalid intruder format |
FORMAT_ERROR | EFMT_102 | Neplatna hodnota pole multipart - EFMT_102 - Invalid multipart format |
FORMAT_ERROR | EFMT_105 | Text zpravy obsahuje nepodporovane znaky - EFMT_105 - SMS text contains unsupported characters |
FORMAT_ERROR | EFMT_106 | Neplatna hodnota pole data coding scheme - EFMT_106 - Invalid data coding scheme |
FORMAT_ERROR | EFMT_121 | Neplatna hodnota pole protocolIdentifier - EFMT_121 - Invalid protocolIdentifier value |
INTERNAL_ERROR | EINT_005 | Zprava zamitnuta SMSC/MMSC - EINT_005 - Message rejected by SMSC/MMSC2 |
INTERNAL_ERROR | EINT_012 | Chyba - Zprava nedorucena z technickych duvodu - EINT_012 - Message not delivered for technical reasons |
INTERNAL_ERROR | EINT_102 | Zprava nedorucena z technickych duvodu - EINT_102 - Message not delivered for technical reasons |
SUCCESS | ISUC_000 | Pozadavek Ping byl uspesny - ISUC_000 - Ping request performed successfully |
SUCCESS | ISUC_001 | Pozadavek Send uspesne zpracovan - ISUC_001 - Send request successfully processed |
SUCCESS | ISUC_002 | Pozadavek Confirm uspesne zpracovan - ISUC_002 - Confirm request successfully processed |
SUCCESS | ISUC_005 | Zprava byla dorucena - ISUC_005 - Message delivered |
SUCCESS | ISUC_006 | Zprava nebyla dorucena - ISUC_006 - Message delivery failed |
SUCCESS | ISUC_010 | Zprava byla dorucena na SMSC/MMSC - ISUC_010 - Message forwarded to SMSC/MMSC |
Příklady
Ping
POST /smsconnector/services/PPGwPort HTTP/1.1
Host: www.ipsms.cz:8443
content-length: 340<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soap:Header/>
<soap:Body>
<ping xmlns="http://smsgw.vodafone.cz">
<baID>111222</baID>
</ping>
</soap:Body>
</soap:Envelope>HTTP/1.1 200 OK
Content-Length: 558<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns1="http://smsgw.vodafone.cz">
<SOAP-ENV:Body>
<ns1:pingResponse>
<result>
<baID>111222</baID>
<msgID xsi:nil="true"/>
<code>ISUC_000</code>
<description>Ping request performed successfully</description>
<refBaID>111222</refBaID>
<refMsgID xsi:nil="true"/>
<timestamp>2012-01-26T21:10:12+01:00</timestamp>
<type>SUCCESS</type>
</result>
</ns1:pingResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
sendSms
POST /smsconnector/services/PPGwPort HTTP/1.1
Host: www.ipsms.cz:8443
content-length: 547<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soap:Header/>
<soap:Body>
<sendSms xmlns="http://smsgw.vodafone.cz">
<baID>111222</baID>
<text>smsgw, test sendSms 26.01.2012 21:10</text>
<toNumber>+420123456789</toNumber>
<fromNumber>0</fromNumber>
<validityPeriod>10000</validityPeriod>
<priority>1</priority>
<intruder>False</intruder>
</sendSms>
</soap:Body>
</soap:Envelope>HTTP/1.1 200 OK
Content-Length: 274<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://smsgw.vodafone.cz">
<SOAP-ENV:Body>
<ns1:sendSmsResponse>
<result>ISUC_001</result>
</ns1:sendSmsResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
send
POST /smsconnector/services/PPGwPort HTTP/1.1
Host: www.ipsms.cz:8443
content-length: 812<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soap:Header/>
<soap:Body>
<send xmlns="http://smsgw.vodafone.cz">
<mc>
<selector>TextSms</selector>
<textSms>
<fromNumber>0</fromNumber>
<text>smsgw, test send 26.01.2012 21:10</text>
<protocolIdentifier>0</protocolIdentifier>
<header/>
<baID>111222</baID>
<intruder>False</intruder>
<premiumInfo/>
<reportLevel>terminal</reportLevel>
<msgID>g8s1gs8f</msgID>
<priority>1</priority>
<toNumber>+420123456789</toNumber>
<multiPart>False</multiPart>
<dataCodingScheme>0</dataCodingScheme>
<validityPeriod>10000</validityPeriod>
</textSms>
<response/>
<mms/>
<binarySms/>
</mc>
</send>
</soap:Body>
</soap:Envelope>HTTP/1.1 200 OK
Content-Length: 553<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://smsgw.vodafone.cz"><SOAP-ENV:Body>
<ns1:sendResponse>
<result>
<baID>111222</baID>
<msgID>g8s1gs8f</msgID>
<code>ISUC_001</code>
<description>Pozadavek Send uspesne zpracovan - ISUC_001 - Send request successfully processed</description>
<refBaID>111222</refBaID>
<refMsgID>g8s1gs8f</refMsgID>
<timestamp>2012-01-26T21:10:15+01:00</timestamp>
<type>SUCCESS</type>
</result>
</ns1:sendResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
receive (doručenka)
POST /smsconnector/services/PPGwPort HTTP/1.1
Host: www.ipsms.cz:8443
content-length: 346<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soap:Header/>
<soap:Body>
<receive xmlns="http://smsgw.vodafone.cz">
<baID>111222</baID>
</receive>
</soap:Body>
</soap:Envelope>HTTP/1.1 200 OK
Content-Length: 727<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns1="http://smsgw.vodafone.cz">
<SOAP-ENV:Body>
<ns1:receiveResponse>
<result>
<binarySms xsi:nil="true"/>
<mms xsi:nil="true"/>
<response>
<baID>111222</baID>
<msgID>2012-01-26 21:10:43.571873+01</msgID>
<code>ISUC_005</code>
<description>Zprava byla dorucena - ISUC_005 - Message delivered</description>
<refBaID>111222</refBaID>
<refMsgID>g8s1gs8f</refMsgID>
<timestamp>2012-01-26T21:10:45+01:00</timestamp>
<type>SUCCESS</type>
</response>
<selector>Response</selector>
<textSms xsi:nil="true"/>
</result>
</ns1:receiveResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
receive (příchozí SMS)
POST /smsconnector/services/PPGwPort HTTP/1.1
Host: www.ipsms.cz:8443
content-length: 346<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soap:Header/>
<soap:Body>
<receive xmlns="http://smsgw.vodafone.cz">
<baID>111222</baID>
</receive>
</soap:Body>
</soap:Envelope>HTTP/1.1 200 OK
Content-Length: 936<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns1="http://smsgw.vodafone.cz">
<SOAP-ENV:Body>
<ns1:receiveResponse>
<result>
<binarySms xsi:nil="true"/>
<mms xsi:nil="true"/>
<response xsi:nil="true"/>
<selector>TextSms</selector>
<textSms>
<baID>111222</baID>
<msgID>2012-01-26 21:11:13.465264+01</msgID>
<priority xsi:nil="true"/>
<dataCodingScheme>0</dataCodingScheme>
<fromNumber>+420987654321</fromNumber>
<header xsi:nil="true"/>
<premiumInfo>
<billingCode xsi:nil="true"/>
<orderID xsi:nil="true"/>
<orderingChannel xsi:nil="true"/>
</premiumInfo>
<protocolIdentifier>0</protocolIdentifier>
<reportLevel xsi:nil="true"/>
<toNumber xsi:nil="true"/>
<validityPeriod/>
<intruder>true</intruder>
<multiPart>true</multiPart>
<text>prichozi sms</text>
</textSms>
</result>
</ns1:receiveResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
confirm
POST /smsconnector/services/PPGwPort HTTP/1.1
Host: www.ipsms.cz:8443
content-length: 421<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soap:Header/>
<soap:Body>
<confirm xmlns="http://smsgw.vodafone.cz">
<baID>111222</baID>
<refBaID>111222</refBaID>
<refMsgID>2012-01-26 21:10:43.602884+01</refMsgID>
</confirm>
</soap:Body>
</soap:Envelope>HTTP/1.1 200 OK
Content-Length: 558<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://smsgw.vodafone.cz">
<SOAP-ENV:Body>
<ns1:confirmResponse>
<result>
<baID>111222</baID>
<msgID>2012-01-26 21:10:43.602884+01</msgID>
<code>ISUC_002</code>
<description>Confirm request successfully processed</description>
<refBaID>111222</refBaID>
<refMsgID>2012-01-26 21:10:43.602884+01</refMsgID>
<timestamp>2012-01-26T21:10:56+01:00</timestamp>
<type>SUCCESS</type>
</result>
</ns1:confirmResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Push Mode
Pro použití Push Mode musí zákazník zpřístupnit rozhraní podle tohoto WSDL.