SOAP API

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ů

parametrpopisvýchozí hodnota
Message.baID : Stringidentifikace Business Application
Message.msgID : Stringidentifikace SMS
Request.priority : String1 - VIP
2 - vysoká
3 - normální
Sms.fromNumber : Stringodchozí číslo
Sms.toNumber : Stringcílové číslo ve formátu +420123456789
Sms.reportLevel : String
Sms.validityPeriod : longpočet sekund, jak dlouho se bude SMS snažit doručit příjemcimax
Sms.protocolIdentifier: integeridentifikator SMS zprávy (0 - 255)
Sms.dataCodingScheme: intdata 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 datadata binární SMS
TextSms.intruder: booleantrue - SMS se zobrazí ihned
false - standardní SMS
false
TextSms.multiPart: booleantrue - delší SMS se rozdělí na více částí, max 900 znaků
false - standardní SMS, max 160 znaků
true
TextSms.text: Stringtext SMS
Response.refBaID: StringbaID potvrzované SMS
Response.refMsgID: StringmsgID potvrzované SMS
Response.type: Stringtyp odpovědi
Response.code: Stringnávratový kód
Response.description: Stringpopis responseCode
Response.timestamp: DateTimečas generování odpovědi
MessageContainer.selector: StringTextSms
BinarySms
Mms
Response
MessageContainer.binarySmsdata pro selector = BinarySms, jinak null
MessageContainer.mmsdata pro selector = Mms, jinak null
MessageContainer.responsedata pro selector = Response, jinak null
MessageContainer.textSmsdata pro selector = TextSms, jinak null

WSDL

WSDL k dispozici zde.

 

Návratové kódy

typkódpopis
APPL_ERROREAPP_003BaID neni aktivni - EAPP_003 - BaID is not active
APPL_ERROREAPP_019Zprava zaslana po terminu platnosti zkusebniho rezimu - EAPP_019 - Trial period has expired
APPL_ERROREAPP_020Pocet zprav ve zkusebnim rezimu vycerpan - EAPP_020 - No. of messages in trial mode exceeded
APPL_ERROREAPP_023Prekrocen maximalni pocet zprav, ktere je mozne zaslat v jednom mesici - EAPP_023 - Maximum quota of messages per month exceeded
APPL_ERROREAPP_024Prekrocen maximalni pocet zprav, ktere je mozne zaslat behem jednoho dne - EAPP_024 - Maximum quota of messages per day exceeded
APPL_ERROREAPP_025Zprava potvrzovana pres pozadavek Confirm neni k dispozici - EAPP_025 - No message found for Confirm request
APPL_ERROREAPP_037 Limit zprav cekajicich na potvrzeni prijeti prekrocen - EAPP_037 - Too many messages waiting for confirmation
APPL_ERROREAPP_050Maximalni limit soucasnych pozadavku prekrocen - EAPP_050 - Maximum number of concurrent requests exceeded
APPL_ERROREAPP_051Nadlimitni pocet soucasnych pozadavku na potvrzeni prijeti zpravy EAPP_051 - Too many concurrent confirm requests
APPL_ERROREAPP_052Nadlimitni pocet soucasnych pozadavku na prijeti zpravy - EAPP_052 - Too many concurrent receive requests
APPL_ERROREAPP_053Nadlimitni pocet soucasnych pozadavku na zaslani zpravy - EAPP_053 - Too many concurrent send requests
APPL_ERROREAPP_060Aplikace neni opravnena pouzivat cislo MSISDN v poli fromNumber - EAPP_060 - Application is not authorised to use MSISDN number in fromNumber field
APPL_ERROREAPP_101Zprava 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_ERROREAPP_107Aplikace SMS Connector nemuze posilat zpravy MMS - EAPP_107 - SMS Connector application is not allowed to send MMSs
APPL_ERROREAPP_109Aplikace SMS Connector nemuze posilat premiove zpravy - EAPP_109 - SMS Connector application is not allowed to send premium messages
AUTHORIZATION_ERROR EAUT_001Neplatny certifikat - EAUT_001 - Invalid certificate
AUTHORIZATION_ERROR EAUT_002ID neni platne nebo není autorizovano pro certifikat - EAUT_002 - BA ID not valid or not authorised for certificate
AUTHORIZATION_ERROR EAUT_003Ref BA ID neni autorizovano pro certifikat - EAUT_003 - Ref BA ID not authorised for certificate
FORMAT_ERROREFMT_004Neplatny identifikator zpravy - EFMT_004 - Invalid message ID
FORMAT_ERROREFMT_005Neplatna priorita zpravy - EFMT_005 - Invalid message priority
FORMAT_ERROREFMT_006Nesoulad cisla fromNumber s BA ID - EFMT_006 - Invalid fromNumber (mismatch with BA ID)
FORMAT_ERROREFMT_007Neplatny format MSISDN cisla prijemce - EFMT_007 - Invalid recipient MSISDN number format
FORMAT_ERROREFMT_008Neznama hodnota pole Selector - EFMT_008 - Unknown Selector value
FORMAT_ERROREFMT_009Prilis dlouhy sufix zpravy - EFMT_009 - Message suffix too long
FORMAT_ERROREFMT_010Neplatny format MSISDN cisla fromNumber - EFMT_010 - Invalid MSISDN number format of fromNumber
FORMAT_ERROREFMT_011Sufix zpravy musi byt ciselna hodnota - EFMT_011 - Message suffix must be numeric
FORMAT_ERROREFMT_012Jen jedno z poli suffix a fromNumber muze byt vyplneno - EFMT_012 - Only one of the suffix and fromNumber fields might be filled in
FORMAT_ERROREFMT_013Neplatna hodnota pole Report Level / Delivery Report - EFMT_013 - Invalid Report Level / Delivery Report
FORMAT_ERROREFMT_016Neplatny format pole Validity period - EFMT-016 - Incorrect message validity format
FORMAT_ERROREFMT_023Binarni SMS neobsahuje zadna data - EFMT_023 - No data in binary SMS
FORMAT_ERROREFMT_024Binarni zprava je delsi nez 140 znaku - EFMT_024 - Binary message longer than 140 characters
FORMAT_ERROREFMT_025SMS nemuze byt soucasne poslana jako multipart a intruder - EFMT_025 - SMS cannot be sent as multipart and intruder at the same time.
FORMAT_ERROREFMT_026Nepripustna delka zpravy - EFMT_026 - Message too long
FORMAT_ERROREFMT_032Pole BA ID je prazdne - EFMT_032 - BA ID empty
FORMAT_ERROREFMT_034Zprava neobsahuje zadny text - EFMT_034 – Text message empty
FORMAT_ERROREFMT_035Neplatny pozadavek - EFMT_035 - Bad Request
FORMAT_ERROREFMT_101Neplatna hodnota pole Intruder - EFMT_101 - Invalid intruder format
FORMAT_ERROREFMT_102Neplatna hodnota pole multipart - EFMT_102 - Invalid multipart format
FORMAT_ERROREFMT_105Text zpravy obsahuje nepodporovane znaky - EFMT_105 - SMS text contains unsupported characters
FORMAT_ERROREFMT_106Neplatna hodnota pole data coding scheme - EFMT_106 - Invalid data coding scheme
FORMAT_ERROREFMT_121Neplatna hodnota pole protocolIdentifier - EFMT_121 - Invalid protocolIdentifier value
INTERNAL_ERROREINT_005Zprava zamitnuta SMSC/MMSC - EINT_005 - Message rejected by SMSC/MMSC2
INTERNAL_ERROREINT_012Chyba - Zprava nedorucena z technickych duvodu - EINT_012 - Message not delivered for technical reasons
INTERNAL_ERROREINT_102Zprava nedorucena z technickych duvodu - EINT_102 - Message not delivered for technical reasons
SUCCESSISUC_000Pozadavek Ping byl uspesny - ISUC_000 - Ping request performed successfully
SUCCESSISUC_001Pozadavek Send uspesne zpracovan - ISUC_001 - Send request successfully processed
SUCCESSISUC_002Pozadavek Confirm uspesne zpracovan - ISUC_002 - Confirm request successfully processed
SUCCESSISUC_005Zprava byla dorucena - ISUC_005 - Message delivered
SUCCESSISUC_006Zprava nebyla dorucena - ISUC_006 - Message delivery failed
SUCCESSISUC_010Zprava byla dorucena na SMSC/MMSC - ISUC_010 - Message forwarded to SMSC/MMSC

 

Příklady

Ping

POST /smsconnector/services/PPGwPort HTTP/1.1
Host: vftestsms.lbox.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: vftestsms.lbox.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: vftestsms.lbox.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: vftestsms.lbox.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: vftestsms.lbox.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: vftestsms.lbox.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.