NetCom SMS Bedrift API - - - - - Technical Documentation



Similar documents
HTTP Protocol. Bartosz Walter

reference: HTTP: The Definitive Guide by David Gourley and Brian Totty (O Reilly, 2002)

Security-Assessment.com White Paper Leveraging XSRF with Apache Web Server Compatibility with older browser feature and Java Applet

THE PROXY SERVER 1 1 PURPOSE 3 2 USAGE EXAMPLES 4 3 STARTING THE PROXY SERVER 5 4 READING THE LOG 6

Secure XML API Integration Guide. (with FraudGuard add in)

Qualys API Limits. July 10, Overview. API Control Settings. Implementation

Usage of Evaluate Client Certificate with SSL support in Mediator and CentraSite

RPC over XML. Web services with Java. How to install it? Reference implementation. Setting the environment variables. Preparing the system

Outline Definition of Webserver HTTP Static is no fun Software SSL. Webserver. in a nutshell. Sebastian Hollizeck. June, the 4 th 2013

CTIS 256 Web Technologies II. Week # 1 Serkan GENÇ

QIWI Wallet Pull Payments API

HTTP Authentication. RFC 2617 obsoletes RFC 2069

Internet Technologies. World Wide Web (WWW) Proxy Server Network Address Translator (NAT)

Order Notifications - reporting a payment status

CONTRACT MODEL IPONZ DESIGN SERVICE VERSION 2. Author: Foster Moore Date: 20 September 2011 Document Version: 1.7

Building a Multi-Threaded Web Server

What is Distributed Annotation System?

Table of Contents. Open-Xchange Authentication & Session Handling. 1.Introduction...3

Messaging API. API Specification Document Messaging API. Functionality: Send SMS Messages.

Secure XML API Integration Guide - Periodic and Triggered add in

No. Time Source Destination Protocol Info HTTP GET /ethereal-labs/http-ethereal-file1.html HTTP/1.

Internet Technologies Internet Protocols and Services

Protocolo HTTP. Web and HTTP. HTTP overview. HTTP overview

HOST EUROPE CLOUD STORAGE REST API DEVELOPER REFERENCE

HTTP. Internet Engineering. Fall Bahador Bakhshi CE & IT Department, Amirkabir University of Technology

StreamServe Job Gateway

02267: Software Development of Web Services

Lesson: All About Sockets

WIRIS quizzes web services Getting started with PHP and Java

Technical documentation

JASPERREPORTS SERVER WEB SERVICES GUIDE

The HTTP Plug-in. Table of contents

Easy CramBible Lab DEMO ONLY VERSION Test284,IBM WbS.DataPower SOA Appliances, Firmware V3.6.0

Forms, CGI Objectives. HTML forms. Form example. Form example...

Overview of Web Services API

Remote Access API 2.0

AIRTEL INDIA OPEN API. Application Developer Guide for OAuth2 Authentication and Authorization. Document Version 1.1

Module 45 (More Web Hacking)

WebNow Single Sign-On Solutions

CloudOYE CDN USER MANUAL

Copyright 2013 Consona Corporation. All rights reserved

Fairsail REST API: Guide for Developers

ipayment Gateway API (IPG API)

Java Web Application Security

HireDesk API V1.0 Developer s Guide

USING MYWEBSQL FIGURE 1: FIRST AUTHENTICATION LAYER (ENTER YOUR REGULAR SIMMONS USERNAME AND PASSWORD)

PlayReady App Creation Tutorial

Playing with Web Application Firewalls

02267: Software Development of Web Services

MSDG Services Integration Document Draft Ver 1.2

Network Technologies

Riverbed Cascade Shark Common REST API v1.0

Crowbar: New generation web application brute force attack tool

DEPLOYMENT GUIDE Version 1.1. Deploying the BIG-IP LTM v10 with Citrix Presentation Server 4.5

Adobe Document Service Configuration and Troubleshooting Guide

StreamServe Persuasion SP4 Service Broker

GET /FB/index.html HTTP/1.1 Host: lmi32.cnam.fr

OpenStack Object Storage Developer Guide

Replacements TECHNICAL REFERENCE. DTCCSOLUTIONS Dec Copyright 2009 Depository Trust Clearing Corporation. All Rights Reserved.

Web Programming. Robert M. Dondero, Ph.D. Princeton University

Advanced HTTP API Documentation

Cloud Elements! Marketing Hub Provisioning and Usage Guide!

Upgrading Your Web Server from ClientBase Browser Version 2.0 or Above to Version 2.1.1

Web applications. Web security: web basics. HTTP requests. URLs. GET request. Myrto Arapinis School of Informatics University of Edinburgh

API Document Webaroo Technology India Pvt. Ltd.

How To Configure The Jasig Casa Single Sign On On A Workstation On Ahtml.Org On A Server On A Microsoft Server On An Ubuntu (Windows) On A Linux Computer On A Raspberry V

Abusing the Internet of Things. BLACKOUTS. FREAKOUTS. AND

GTX Mobile Messaging SMS Gateway Interface Simple HTTP API Manual

Designing RESTful Web Applications

Introduction to Java. Module 12: Networking (Java Sockets) Prepared by Costantinos Costa for EPL 233. ΕΠΛ233 Αντικειμενοστρεφής Προγραμματισμός 1

7 Why Use Perl for CGI?

Web. Services. Web Technologies. Today. Web. Technologies. Internet WWW. Protocols TCP/IP HTTP. Apache. Next Time. Lecture # Apache.

This document is to provide help and illustrations to users who wish to deliver SMS using the Pinnacle SMS Gateway via the HTTP Protocol.

ACCREDITATION COUNCIL FOR PHARMACY EDUCATION. CPE Monitor. Technical Specifications

HTTP 1.1 Web Server and Client

CIS 551 / TCOM 401 Computer and Network Security. Spring 2007 Lecture 20

Perceptive Integration Server

Dove User Guide Copyright Virgil Trasca

Cyber Security Workshop Ethical Web Hacking

EMC ViPR Controller. ViPR Controller REST API Virtual Data Center Configuration Guide. Version

TROUBLESHOOTING RSA ACCESS MANAGER SINGLE SIGN-ON FOR WEB-BASED APPLICATIONS

Manual. Programmer's Guide for Java API

APACHE HTTP SERVER 2.2.8

TCP/IP Networking An Example

Web Application Report

Nuance Mobile Developer Program. HTTP Services for Nuance Mobile Developer Program Clients

Introduction to ServerIron ADX Application Switching and Load Balancing. Module 6: Content Switching (CSW) Revision 0310

CS615 - Aspects of System Administration

CGI An Example. CGI Model (Pieces)

1. When will an IP process drop a datagram? 2. When will an IP process fragment a datagram? 3. When will a TCP process drop a segment?

NeoMail Guide. Neotel (Pty) Ltd

Kaseya 2. User Guide. Version 6.1

NAB TRANSACT. XML API Integration Guide

Quick Start Guide Now SMS/MMS Gateway

DEPLOYMENT GUIDE DEPLOYING THE BIG-IP LTM SYSTEM WITH CITRIX PRESENTATION SERVER 3.0 AND 4.5

Transcription:

- - - - - Version 1.2 December 2008

TABLE OF CONTENTS 1 INTRODUCTION... 3 1.1 SCOPE... 3 1.2 REVISION HISTORY... 3 2 SOLUTION OVERVIEW... 4 3 LIMITATIONS... 5 3.1 NUMBER OF RECIPIENTS... 5 3.2 ORIGINATING ADDRESS... 5 3.3 MAXIMUM MESSAGE LENGTH... 5 3.4 DESTINATIONS... 5 4 INTERFACE... 6 4.1 URL... 6 4.2 AUTHENTICATION... 6 4.3 REQUEST PARAMETERS... 6 4.4 RESPONSE... 7 5 USAGE EXAMPLES... 8 5.1 HTTP GET... 8 5.2 HTTP POST... 9 6 FAILURE SCENARIOS... 10 6.1 AUTHENTICATION FAILURE... 10 6.2 VALIDATION FAILURE... 10 6.3 SYSTEM FAILURE... 11 7 TROUBLESHOOTING... 12 8. SAMPLE JAVA CLIENT... 13 Page 2 of 13

1 Introduction 1.1 Scope This document describes the technical interface to the NetCom SMS Bedrift solution. A simple Java example is also included. 1.2 Revision history Date Revision Author Comments 16.03.2002 1.0 JSL Initial version 15.05.2002 1.1 SSC Added information about SSL 18.12.2008 1.2 TRU Corrected SMS destination information. International SMS is possible. Page 3 of 13

2 Solution overview Description: HTTP request Client application HTTP response 1. The client application issues an HTTP request (GET or POST) to a specified URL. 2. A load balancing switch distributes the requests across the web servers. Load balancing switch Web servers Message queue 3. The web server validates the request, performs any necessary character conversion and places the message in a message queue. The HTTP is generated and returned to the client. 4. At the other end of the queue, a consumer takes the message from the message queue and dispatches it to one of the SMSC s. The consumer will also create a log entry for settlement purposes. Consumer 5. The SMS message is delivered to the recipient. SMSC SMSC 1 2 3 4 5 6 7 8 9 Page 4 of 13

3 Limitations 3.1 Number of recipients The current solution can only support a single recipient per message. 3.2 Originating address The SMS message can have the customer s company name as originator. This name can be a maximum of 11 characters long, and can only include small and capital letters excluded æ, ø and å, but space ( ) is allowed. The customer specifies the originator when filling out the order form. NetCom then sets the originator upon activation of the service for the customer. If no originating name is specified by the customer, 2032 is set as originator. 3.3 Maximum message length The maximum message length is 640 characters. Messages that are longer than 160 characters will be split into several parts. 3.4 Destinations The service allows sending to all GSM phones available through NetComs interconnections. Page 5 of 13

4 Interface 4.1 URL Protocol HTTP HTTPS URL http://firebolt.netcom.no:8080/sms/send https://firebolt.netcom.no/sms/send 4.2 Authentication Example: The SMS Bedrift solution relies on HTTP Basic authentication. The realm name is 'CP Authentication'. This requires that the incoming request contains the HTTP Authorization header. The authorization header is then generated by concatenating username and password and then applying base64 encoding. Authorization: Basic bmv0y69tom5ldknvbxi5eg== 4.3 Request parameters Name Description Mandatory message The message text. yes number truncate The message will be checked to ensure that all characters are supported by the SMS-C. Unsupported/illegal characters will be automatically converted to their supported counterparts. The recipient MSISDN including the international prefix. Do not include a leading +. Example: 4793224070 Optional parameter that can be used to truncate a message to 160 characters. truncate=1 truncate message truncate=0 no truncation Default is no truncation (0). yes no Page 6 of 13

4.4 Response The HTTP response is encoded as XML (content type text/xml). The basic structure of the response XML is shown below: <?xml version="1.0" encoding="iso-8859-1"?> <result> <status/> <error/> </result> Status code values:- Status code Description 200 Success. The message has been accepted for delivery and will be forwarded to the recipient. 504 Validation error. The message has been rejected because of a validation error. An input parameter is either missing or incorrect. The error element will indicate which parameter is at fault. 512 System error. The message has been rejected because of a system failure. Page 7 of 13

5 Usage examples 5.1 HTTP GET Request GET /sms/send?number=4793224070&message=hei HTTP/1.1 Authorization: Basic bmv0y89tom3ldjnvbxh5eg== User-Agent: Java1.3.1_01 Host: localhost:8080 Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2 Connection: keep-alive Response Comments HTTP/1.1 200 OK Content-Type: text/xml Date: Sat, 16 Mar 2002 14:03:09 GMT Transfer-Encoding: chunked Server: Apache Tomcat/4.0.1 (HTTP/1.1 Connector) <?xml version="1.0" encoding="iso-8859-1"?> <result> <status>200</status> <error/> </result> The fully qualified URL is: http://firebolt.netcom.no:8080/sms/send?number=4793224070&messag e=hei Page 8 of 13

5.2 HTTP POST Request Response POST /sms/send HTTP/1.1 Authorization: Basic bmv0y89tom3ldjnvbxh5eg== content-type: application/x-www-form-urlencoded User-Agent: Java1.3.1_01 Host: localhost:8080 Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2 Connection: keep-alive Content-length: 36 number=4793224070&message=hei på deg HTTP/1.1 200 OK Content-Type: text/xml Date: Sat, 16 Mar 2002 14:03:09 GMT Transfer-Encoding: chunked Server: Apache Tomcat/4.0.1 (HTTP/1.1 Connector) <?xml version="1.0" encoding="iso-8859-1"?> <result> <status>200</status> <error/> </result> Page 9 of 13

6 Failure scenarios 6.1 Authentication failure Response The web server will return 401 Unauthorized if authentication fails. An example is show below: - HTTP/1.1 401 Unauthorized Content-Type: text/html Date: Sat, 16 Mar 2002 14:13:16 GMT Server: Apache Tomcat/4.0.1 (HTTP/1.1 Connector) Connection: close WWW-Authenticate: Basic realm="login required" <html><head><title>...<u>this request requires HTTP authentication (Unauthorized).</u></p><HR size="1" noshade></body></html> 6.2 Validation failure Response The web server will return 200 OK when a validation error is encountered. The status element of the response XML will have the value 504 The error element of the response XML will indicate the parameter in error. An example is shown below:- HTTP/1.1 200 OK Content-Type: text/xml Date: Sat, 16 Mar 2002 14:19:15 GMT Server: Apache Tomcat/4.0.1 (HTTP/1.1 Connector) Connection: close <?xml version="1.0" encoding="iso-8859-1"?> <result> <status>504</status> <error>number</error></result> Page 10 of 13

6.3 System failure Response The web server will return 200 OK when a system failure is encountered. The status element of the response XML will have the value 512 The error element of the response XML will indicate the reason. An example is shown below:- HTTP/1.1 200 OK Content-Type: text/xml Date: Sat, 16 Mar 2002 14:19:15 GMT Server: Apache Tomcat/4.0.1 (HTTP/1.1 Connector) Connection: close <?xml version="1.0" encoding="iso-8859-1"?> <result> <status>512</status> <error>number</error></result> Page 11 of 13

7 Troubleshooting Test the service by accessing the URL from a web browser: For service without SSL certificate: For service with SSL certificate: Page 12 of 13

8. Sample Java client //****************************************************************************** //** //** Module name : SmsSendClient.java //** Author : NetCom //** Created : Mar 2002 //** Version : 1.0 //****************************************************************************** import java.net.*; import java.io.*; import org.w3c.tools.codec.base64encoder; //** --------------------------------------------------------------------------- //** Class : SmsSendClient //** Extends : None //** Implements : None //** Visibility : Public //** Description : A simple application demonstrating SMS send function //** --------------------------------------------------------------------------- public class SmsSendClient { //** ------------------------------------------------------------------------- //** Constants ** //** ------------------------------------------------------------------------- private static final String suser = "netcom"; private static final String spassword = "fgsds42k"; private static final String surl = "http://localhost:8080/sms/send"; private static final String susage = "Usage: SmsSendClient <number> <message>"; //** ------------------------------------------------------------------------- //** main() //** ------------------------------------------------------------------------- //** Send SMS using HTTP GET request. //** ------------------------------------------------------------------------- public static void main(string sargs[]) { if (sargs.length!= 2) { System.out.println(sUsage); System.exit(0); } } try { // prepare request String snumber = sargs[0]; String smessage = sargs[1]; String srequest = surl + "?" + "number=" + snumber + "&" + "message=" + URLEncoder.encode(sMessage); URLConnection conn = new URL(sRequest).openConnection(); // set authorization header Base64Encoder enc = new Base64Encoder(sUser + ":" + spassword); String sauthheader = "Basic " + enc.processstring(); conn.setrequestproperty("authorization",sauthheader); // issue request BufferedReader reader = new BufferedReader( new InputStreamReader((InputStream)conn.getContent())); // read response String sline = null; while ((sline = reader.readline())!= null) System.out.println(sLine); } catch (Exception e) { e.printstacktrace(); } } // class SmsSendClient Page 13 of 13