SlideShare ist ein Scribd-Unternehmen logo
1 von 20
Developing on the AloAshbei Platform A technical session with the AloAshbei registered developers. 17th July, 2010
Who Am I? 2 Abu AshrafMasnun Business Student at KU PHP & Python Developer
3 Contained REST APIs Common Mistakes Integration  Possibilities Mobilizing the Web
4 REST APIs User makes a request to the REST API. User receives JSON response. Related SOAP API  is called on the server. A HTTP POST call is all you need. Doesn’t require you to play with WSDL files. Implement with almost any programming language.
5 How to use REST APIs? 1. Get the URL for a specific API. 2. Gather the required parameters. 3. Make a HTTP POST call to the URL. 4. Parse the JSON response. Let’s see! Can this be any simpler ?
6 REST APIs Code Sample <?php <?php$a['registrationID'] = "masnun";  $a['password'] = "******";   $a['sourceMsisdn'] = '8801711******';   $a['destinationMsisdn'] = '8801711******';  $a['smsPort'] = 7424;  $a['msgType'] = 4;  $a['charge'] = 2.00; $a['chargedParty'] = '8801711******';   $a['contentArea'] = 'gpgp_psms';  $a['msgContent'] = 'Hello GP API!'; $ch = curl_init("http://masnun.com/aloashbei/sms/send"); curl_setopt($ch, CURLOPT_POST, 1); $data = ""; foreach($a as $k => $v)  { $data.= "$k=$v&"; } curl_setopt($ch, CURLOPT_POSTFIELDS, $data); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $result = curl_exec($ch); var_dump($result); ?>
<?php 7 Parsing JSON Response <?php$dataObject = json_decode($result); echo $dataObject->SendSMSResponse->status; ?>
8 Detailed Docs on REST APIs For documentation and API specific code samples: http://masnun.com/aloashbei/
9 Common Mistakes While Working with the APIs 1.  Not editing the WSDL file. 2.  Missing out one or more parameter. 3.  Wrong Request Name. 4.   Miss-matching parameters. 5.   Others. Look into the docs.  Use the Wiki or Forums. And how to resolve them?
10 Integrations Python PHP SoapClient REST APIs
11 Integration : PHP <?php$soap = new SoapClient("http://localhost/gp/wsdl/WebService_GP_ADP_BizTalk_LBS_Orchestration.asmx");  $a['registrationID'] = "masnun"; $a['msisdn'] = '8801711******'; $a['password'] = “******"; try {     var_dump( $soap->requestLocation( array ("LBSRequest" => $a) ) ); } catch (Exception $e) {      var_dump($e->getMessage());   } ?>
12 Integration : Python Python aims to combine "remarkable power with very clear syntax" Wikipedia PyQT Django / Google App Engine GUI Apps Web Apps
13 Python & REST APIs import urllib, json req = { 		"registrationID":"masnun", 		"password":“******", 		"msisdn":"8801711******" 	} url = "http://masnun.com/aloashbei/location/get" input = urllib.urlopen(url,urllib.urlencode(req)).read() data = json.loads(input) print data['LBSResponse']['Status'] print data['LBSResponse']['Latitude'] print data['LBSResponse']['Longitude']
14 Python & REST APIs: Output C:sersaSnunesktop>rest.py OK 23.780268 90.407782 C:sersaSnunesktop>
15 Google App Engine ,[object Object]
 Persistent storage with queries, sorting and transactions.
 Automatic scaling and load balancing.
 APIs for authenticating users and sending email using Google Accounts.
 A fully featured local development environment that simulates Google App Engine on your computer.
Scheduled tasks for triggering events at specified times and regular intervalsFREE

Weitere ähnliche Inhalte

Was ist angesagt?

Silex and Twig (PHP Dorset talk)
Silex and Twig (PHP Dorset talk)Silex and Twig (PHP Dorset talk)
Silex and Twig (PHP Dorset talk)Dave Hulbert
 
How not to develop with Plone
How not to develop with PloneHow not to develop with Plone
How not to develop with PloneLennart Regebro
 
INTERFACE by apidays_Automating style guides for REST, gRPC, or GraphQL by Ph...
INTERFACE by apidays_Automating style guides for REST, gRPC, or GraphQL by Ph...INTERFACE by apidays_Automating style guides for REST, gRPC, or GraphQL by Ph...
INTERFACE by apidays_Automating style guides for REST, gRPC, or GraphQL by Ph...apidays
 
Assurer - a pluggable server testing/monitoring framework
Assurer - a pluggable server testing/monitoring frameworkAssurer - a pluggable server testing/monitoring framework
Assurer - a pluggable server testing/monitoring frameworkGosuke Miyashita
 
Create a web-app with Cgi Appplication
Create a web-app with Cgi AppplicationCreate a web-app with Cgi Appplication
Create a web-app with Cgi Appplicationolegmmiller
 
REST with Her (and let Her take care of the REST)
REST with Her (and let Her take care of the REST)REST with Her (and let Her take care of the REST)
REST with Her (and let Her take care of the REST)Simon Courtois
 
Magento - a Zend Framework Application
Magento - a Zend Framework ApplicationMagento - a Zend Framework Application
Magento - a Zend Framework ApplicationZendCon
 
Application Diagnosis with Zend Server Tracing
Application Diagnosis with Zend Server TracingApplication Diagnosis with Zend Server Tracing
Application Diagnosis with Zend Server TracingZendCon
 
The 90-Day Startup with Google AppEngine for Java
The 90-Day Startup with Google AppEngine for JavaThe 90-Day Startup with Google AppEngine for Java
The 90-Day Startup with Google AppEngine for JavaDavid Chandler
 
Matt Greenwood & Scott Draves - The Polyglot Beaker Notebook
Matt Greenwood & Scott Draves - The Polyglot Beaker NotebookMatt Greenwood & Scott Draves - The Polyglot Beaker Notebook
Matt Greenwood & Scott Draves - The Polyglot Beaker NotebookPyData
 
Python RESTful webservices with Python: Flask and Django solutions
Python RESTful webservices with Python: Flask and Django solutionsPython RESTful webservices with Python: Flask and Django solutions
Python RESTful webservices with Python: Flask and Django solutionsSolution4Future
 
The Basics Of Page Creation
The Basics Of Page CreationThe Basics Of Page Creation
The Basics Of Page CreationWildan Maulana
 
Extending burp with python
Extending burp with pythonExtending burp with python
Extending burp with pythonHoang Nguyen
 

Was ist angesagt? (16)

Silex and Twig (PHP Dorset talk)
Silex and Twig (PHP Dorset talk)Silex and Twig (PHP Dorset talk)
Silex and Twig (PHP Dorset talk)
 
How not to develop with Plone
How not to develop with PloneHow not to develop with Plone
How not to develop with Plone
 
Rails 101
Rails 101Rails 101
Rails 101
 
INTERFACE by apidays_Automating style guides for REST, gRPC, or GraphQL by Ph...
INTERFACE by apidays_Automating style guides for REST, gRPC, or GraphQL by Ph...INTERFACE by apidays_Automating style guides for REST, gRPC, or GraphQL by Ph...
INTERFACE by apidays_Automating style guides for REST, gRPC, or GraphQL by Ph...
 
Key features PHP 5.3 - 5.6
Key features PHP 5.3 - 5.6Key features PHP 5.3 - 5.6
Key features PHP 5.3 - 5.6
 
Introduction to PHP
Introduction to PHPIntroduction to PHP
Introduction to PHP
 
Assurer - a pluggable server testing/monitoring framework
Assurer - a pluggable server testing/monitoring frameworkAssurer - a pluggable server testing/monitoring framework
Assurer - a pluggable server testing/monitoring framework
 
Create a web-app with Cgi Appplication
Create a web-app with Cgi AppplicationCreate a web-app with Cgi Appplication
Create a web-app with Cgi Appplication
 
REST with Her (and let Her take care of the REST)
REST with Her (and let Her take care of the REST)REST with Her (and let Her take care of the REST)
REST with Her (and let Her take care of the REST)
 
Magento - a Zend Framework Application
Magento - a Zend Framework ApplicationMagento - a Zend Framework Application
Magento - a Zend Framework Application
 
Application Diagnosis with Zend Server Tracing
Application Diagnosis with Zend Server TracingApplication Diagnosis with Zend Server Tracing
Application Diagnosis with Zend Server Tracing
 
The 90-Day Startup with Google AppEngine for Java
The 90-Day Startup with Google AppEngine for JavaThe 90-Day Startup with Google AppEngine for Java
The 90-Day Startup with Google AppEngine for Java
 
Matt Greenwood & Scott Draves - The Polyglot Beaker Notebook
Matt Greenwood & Scott Draves - The Polyglot Beaker NotebookMatt Greenwood & Scott Draves - The Polyglot Beaker Notebook
Matt Greenwood & Scott Draves - The Polyglot Beaker Notebook
 
Python RESTful webservices with Python: Flask and Django solutions
Python RESTful webservices with Python: Flask and Django solutionsPython RESTful webservices with Python: Flask and Django solutions
Python RESTful webservices with Python: Flask and Django solutions
 
The Basics Of Page Creation
The Basics Of Page CreationThe Basics Of Page Creation
The Basics Of Page Creation
 
Extending burp with python
Extending burp with pythonExtending burp with python
Extending burp with python
 

Ähnlich wie Developing on the aloashbei platform

P H P Part I I, By Kian
P H P  Part  I I,  By  KianP H P  Part  I I,  By  Kian
P H P Part I I, By Kianphelios
 
Going crazy with Node.JS and CakePHP
Going crazy with Node.JS and CakePHPGoing crazy with Node.JS and CakePHP
Going crazy with Node.JS and CakePHPMariano Iglesias
 
The new features of PHP 7 - Enrico Zimuel - Codemotion Milan 2016
The new features of PHP 7 - Enrico Zimuel - Codemotion Milan 2016The new features of PHP 7 - Enrico Zimuel - Codemotion Milan 2016
The new features of PHP 7 - Enrico Zimuel - Codemotion Milan 2016Codemotion
 
Php Asp Net Interoperability Rc Jao
Php Asp Net Interoperability Rc JaoPhp Asp Net Interoperability Rc Jao
Php Asp Net Interoperability Rc Jaojedt
 
Workshop KrakYourNet2016 - Web applications hacking Ruby on Rails example
Workshop KrakYourNet2016 - Web applications hacking Ruby on Rails example Workshop KrakYourNet2016 - Web applications hacking Ruby on Rails example
Workshop KrakYourNet2016 - Web applications hacking Ruby on Rails example Anna Klepacka
 
Php7 HHVM and co
Php7 HHVM and coPhp7 HHVM and co
Php7 HHVM and coweltling
 
Cakefest 2010: API Development
Cakefest 2010: API DevelopmentCakefest 2010: API Development
Cakefest 2010: API DevelopmentAndrew Curioso
 
Create a res tful services api in php.
Create a res tful services api in php.Create a res tful services api in php.
Create a res tful services api in php.Adeoye Akintola
 
Rails Presentation (Anton Dmitriyev)
Rails Presentation (Anton Dmitriyev)Rails Presentation (Anton Dmitriyev)
Rails Presentation (Anton Dmitriyev)True-Vision
 

Ähnlich wie Developing on the aloashbei platform (20)

P H P Part I I, By Kian
P H P  Part  I I,  By  KianP H P  Part  I I,  By  Kian
P H P Part I I, By Kian
 
Develop webservice in PHP
Develop webservice in PHPDevelop webservice in PHP
Develop webservice in PHP
 
Introduction to PHP
Introduction to PHPIntroduction to PHP
Introduction to PHP
 
Php mysql ppt
Php mysql pptPhp mysql ppt
Php mysql ppt
 
Phpwebdevelping
PhpwebdevelpingPhpwebdevelping
Phpwebdevelping
 
Going crazy with Node.JS and CakePHP
Going crazy with Node.JS and CakePHPGoing crazy with Node.JS and CakePHP
Going crazy with Node.JS and CakePHP
 
สปริงเฟรมเวิร์ค4.1
สปริงเฟรมเวิร์ค4.1สปริงเฟรมเวิร์ค4.1
สปริงเฟรมเวิร์ค4.1
 
working with PHP & DB's
working with PHP & DB'sworking with PHP & DB's
working with PHP & DB's
 
Phpwebdev
PhpwebdevPhpwebdev
Phpwebdev
 
REST API for your WP7 App
REST API for your WP7 AppREST API for your WP7 App
REST API for your WP7 App
 
The new features of PHP 7 - Enrico Zimuel - Codemotion Milan 2016
The new features of PHP 7 - Enrico Zimuel - Codemotion Milan 2016The new features of PHP 7 - Enrico Zimuel - Codemotion Milan 2016
The new features of PHP 7 - Enrico Zimuel - Codemotion Milan 2016
 
The new features of PHP 7
The new features of PHP 7The new features of PHP 7
The new features of PHP 7
 
Php Asp Net Interoperability Rc Jao
Php Asp Net Interoperability Rc JaoPhp Asp Net Interoperability Rc Jao
Php Asp Net Interoperability Rc Jao
 
Workshop KrakYourNet2016 - Web applications hacking Ruby on Rails example
Workshop KrakYourNet2016 - Web applications hacking Ruby on Rails example Workshop KrakYourNet2016 - Web applications hacking Ruby on Rails example
Workshop KrakYourNet2016 - Web applications hacking Ruby on Rails example
 
Php7 HHVM and co
Php7 HHVM and coPhp7 HHVM and co
Php7 HHVM and co
 
Cakefest 2010: API Development
Cakefest 2010: API DevelopmentCakefest 2010: API Development
Cakefest 2010: API Development
 
Create a res tful services api in php.
Create a res tful services api in php.Create a res tful services api in php.
Create a res tful services api in php.
 
Web Scraping with PHP
Web Scraping with PHPWeb Scraping with PHP
Web Scraping with PHP
 
Crafting APIs
Crafting APIsCrafting APIs
Crafting APIs
 
Rails Presentation (Anton Dmitriyev)
Rails Presentation (Anton Dmitriyev)Rails Presentation (Anton Dmitriyev)
Rails Presentation (Anton Dmitriyev)
 

Kürzlich hochgeladen

Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 

Kürzlich hochgeladen (20)

Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 

Developing on the aloashbei platform

  • 1. Developing on the AloAshbei Platform A technical session with the AloAshbei registered developers. 17th July, 2010
  • 2. Who Am I? 2 Abu AshrafMasnun Business Student at KU PHP & Python Developer
  • 3. 3 Contained REST APIs Common Mistakes Integration Possibilities Mobilizing the Web
  • 4. 4 REST APIs User makes a request to the REST API. User receives JSON response. Related SOAP API is called on the server. A HTTP POST call is all you need. Doesn’t require you to play with WSDL files. Implement with almost any programming language.
  • 5. 5 How to use REST APIs? 1. Get the URL for a specific API. 2. Gather the required parameters. 3. Make a HTTP POST call to the URL. 4. Parse the JSON response. Let’s see! Can this be any simpler ?
  • 6. 6 REST APIs Code Sample <?php <?php$a['registrationID'] = "masnun"; $a['password'] = "******"; $a['sourceMsisdn'] = '8801711******'; $a['destinationMsisdn'] = '8801711******'; $a['smsPort'] = 7424; $a['msgType'] = 4; $a['charge'] = 2.00; $a['chargedParty'] = '8801711******'; $a['contentArea'] = 'gpgp_psms'; $a['msgContent'] = 'Hello GP API!'; $ch = curl_init("http://masnun.com/aloashbei/sms/send"); curl_setopt($ch, CURLOPT_POST, 1); $data = ""; foreach($a as $k => $v) { $data.= "$k=$v&"; } curl_setopt($ch, CURLOPT_POSTFIELDS, $data); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $result = curl_exec($ch); var_dump($result); ?>
  • 7. <?php 7 Parsing JSON Response <?php$dataObject = json_decode($result); echo $dataObject->SendSMSResponse->status; ?>
  • 8. 8 Detailed Docs on REST APIs For documentation and API specific code samples: http://masnun.com/aloashbei/
  • 9. 9 Common Mistakes While Working with the APIs 1. Not editing the WSDL file. 2. Missing out one or more parameter. 3. Wrong Request Name. 4. Miss-matching parameters. 5. Others. Look into the docs. Use the Wiki or Forums. And how to resolve them?
  • 10. 10 Integrations Python PHP SoapClient REST APIs
  • 11. 11 Integration : PHP <?php$soap = new SoapClient("http://localhost/gp/wsdl/WebService_GP_ADP_BizTalk_LBS_Orchestration.asmx"); $a['registrationID'] = "masnun"; $a['msisdn'] = '8801711******'; $a['password'] = “******"; try {     var_dump( $soap->requestLocation( array ("LBSRequest" => $a) ) ); } catch (Exception $e) {      var_dump($e->getMessage());   } ?>
  • 12. 12 Integration : Python Python aims to combine "remarkable power with very clear syntax" Wikipedia PyQT Django / Google App Engine GUI Apps Web Apps
  • 13. 13 Python & REST APIs import urllib, json req = { "registrationID":"masnun", "password":“******", "msisdn":"8801711******" } url = "http://masnun.com/aloashbei/location/get" input = urllib.urlopen(url,urllib.urlencode(req)).read() data = json.loads(input) print data['LBSResponse']['Status'] print data['LBSResponse']['Latitude'] print data['LBSResponse']['Longitude']
  • 14. 14 Python & REST APIs: Output C:sersaSnunesktop>rest.py OK 23.780268 90.407782 C:sersaSnunesktop>
  • 15.
  • 16. Persistent storage with queries, sorting and transactions.
  • 17. Automatic scaling and load balancing.
  • 18. APIs for authenticating users and sending email using Google Accounts.
  • 19. A fully featured local development environment that simulates Google App Engine on your computer.
  • 20. Scheduled tasks for triggering events at specified times and regular intervalsFREE
  • 21. 16 Mobilizing The Web Why mobilize your web applications?
  • 22. 17 Common Challenges in Mobile Web App Development
  • 23. 18 Possibilities on the Mobile Web Messaging/Social Applications. Online Mobile Games. News and Information. Remote control over devices. Content Sharing Services. Possibilities are endless. Let your imagination drive you!