PWGatewaySMS


Click here for a complete list of operations.

MPG_Calculate_Message_Length_UTF8_or_UTF16

Calculo do Tamanho de uma Mensagem em UTF-8 ou UTF_16 (hexa).

Parâmetros da MPG_Calculate_Message_Length_UTF8_or_UTF16: Versão: v_2_00
----------------------------------------------------------------------------------------------------------------------------------
Credencial - Obrigatório - Chave de 40 posições para acesso ao Mobile Pronto Gateway. Esta chave é única
Message - Obrigatório - Mensagem que será enviada ao mobile.

Tipos de Retorno:
1) Tamanho da Mensagem, contendo ela carateres UTF-8 ou UTF-16.
Se a mensagem tivel algum caracter que armazene UTF-16 (Formato de Transformação Unicode de 16-bits) o método irá considerar todos
os caracteres como 16 bits (2 bytes)
2) Se = -1, a Credencial é inválida/Invalid Credencial.
3) Se = -9, erro interno/Internal error

Atenção, pois esta mensagem não considera o Nome do Projeto que pode ter até 8 caracteres e : (9 no total)-----------------------------------------------------------------------------------------------------------------------------------

Test

The test form is only available for requests from the local machine.

SOAP 1.1

The following is a sample SOAP 1.1 request and response. The placeholders shown need to be replaced with actual values.

POST /sms/v_2_00/service.asmx HTTP/1.1
Host: pw-api.com
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "PWGateway/MPG_Calculate_Message_Length_UTF8_or_UTF16"

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <MPG_Calculate_Message_Length_UTF8_or_UTF16 xmlns="PWGateway">
      <Credencial>string</Credencial>
      <Message>string</Message>
    </MPG_Calculate_Message_Length_UTF8_or_UTF16>
  </soap:Body>
</soap:Envelope>
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <MPG_Calculate_Message_Length_UTF8_or_UTF16Response xmlns="PWGateway">
      <MPG_Calculate_Message_Length_UTF8_or_UTF16Result>int</MPG_Calculate_Message_Length_UTF8_or_UTF16Result>
    </MPG_Calculate_Message_Length_UTF8_or_UTF16Response>
  </soap:Body>
</soap:Envelope>

SOAP 1.2

The following is a sample SOAP 1.2 request and response. The placeholders shown need to be replaced with actual values.

POST /sms/v_2_00/service.asmx HTTP/1.1
Host: pw-api.com
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <MPG_Calculate_Message_Length_UTF8_or_UTF16 xmlns="PWGateway">
      <Credencial>string</Credencial>
      <Message>string</Message>
    </MPG_Calculate_Message_Length_UTF8_or_UTF16>
  </soap12:Body>
</soap12:Envelope>
HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <MPG_Calculate_Message_Length_UTF8_or_UTF16Response xmlns="PWGateway">
      <MPG_Calculate_Message_Length_UTF8_or_UTF16Result>int</MPG_Calculate_Message_Length_UTF8_or_UTF16Result>
    </MPG_Calculate_Message_Length_UTF8_or_UTF16Response>
  </soap12:Body>
</soap12:Envelope>