SlideShare a Scribd company logo
Mandakini Kumari
    June 15th 2012
Who am I
 Have 9 + years of experience in open source specially
  PHP, Drupal & Web Services.
 Active crusader to improve effectiveness and reach of
  Free & Open Source Software(FOSS).
 Impart industrial consultancy for best use of software
  application.
 Frequently conduct training for students and
  industrial experts.
What am I going to talk about ?
 Use of Web Services ?
 What is Web Services
 Different Ways: SOAP & REST
 SOAP Vs REST
 How am I going to use REST
 Example: Twitter, Paypal
Use of Web Services(WS)
 Payment Gateway integration for E-commerce site.
 Google Map for a Real Estate Site.
 Product detail for a price comparison website
 Weather forecast for a news or blog site
 Mashup: Combine data from one or more source and
 integrate application
Payment Gateway integration




        http://paypal.com
Why WS for Payment getaway
 Very Fast
 Very Reliable
 Secure
 User don’t know what getway used by the site
 User don’t need to register on payment site e.g. paypal
 Website Administration is very easy e.g. IRCT with
 netbanking ICICI
Google Map Web services for your website
Top APIs for Mashups




        http://programmableweb.com/apis
What is Web Services(WS)
 WS serves as an interface to software
  developers.
 Using WS as an API you can convert
  applications into web-applications.
 WS is the vision of ‘Future Internet’
 The basic Web services platform is XML +
  HTTP.
 WS is future for Mobile application
What is SOAP
 SOAP is a simple XML-based protocol to let
  applications exchange information over HTTP
 Businesses can register their WS on UDDI(Universal
  Description, Discovery and Integration) and provide
  documentation with WSDL (Web Services Description
  Language).
 SOAP is mostly used for Enterprise applications to
  integrate wide types and another trend is to integrate
  with legacy systems
SOAP Architecture
SOAP Building Blocks
Paypal SOAP Building Blocks
A SOAP Envelope
 <?xml version="1.0"?>
  <soap:Envelope
  xmlns:soap="http://www.w3.org/2001/12/soap-envelope"
  soap:encodingStyle="http://www.w3.org/2001/12/soap-
  encoding">
  ....

  </soap:Envelope>
SOAP Header Element
 <SOAP-ENV:Header>
 <RequesterCredentials xmlns=”urn:ebay:api:PayPalAPI”
 xsi:type=”ebl:CustomSecurityHeaderType”>
 <Credentials xmlns=”urn:ebay:apis:eBLBaseComponents”
 xsi:type=”ebl:UserIdPasswordType”>
 <Username>api_username</Username>
 <Password>api_password</Password>
 <Signature>api_signature</Signature>
 <Subject>authorizing_account_emailaddress</Subject>
 </Credentials>
 </RequesterCredentials>
 </SOAP-ENV:Header>
SOAP Body Request Element
 <soap:Body>
  <m:GetPrice mlns:m="http://www.example.com/prices">
   <m:Item>Laptop</m:Item>
  </m:GetPrice>
 </soap:Body>
A SOAP Response
 HTTP/1.1 200 OK
  Content-Type: application/soap+xml; charset=utf-8
  Content-Length: nnn
  <?xml version="1.0"?>
  <soap:Envelope
  xmlns:soap="http://www.w3.org/2001/12/soap-envelope"
  soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding">
  <soap:Body>
   <m:GetPriceResponse xmlns:m="http://www.example.com/prices">
    <m:Price>$900</m:Price>
   </m:GetPriceResponse>
  </soap:Body>
  </soap:Envelope>
PHP SOAP Server Example
$server = new SoapServer("Library.wsdl",array("classmap"=>$classmap));
$server->addFunction("searchAuthors");
$server->addFunction("searchBooks");
$server->handle();
PHP SOAP Client Example
$client=new SoapClient("http://localhost/Library.wsdl",array("trace" => 1));
try
{
 //$response = $client->searchAuthors("Beh");
 $response = $client->searchBooks("te");
var_dump($response);
echo htmlspecialchars($client->__getLastRequest())."";
echo htmlspecialchars($client->__getLastResponse())."";
}catch(Exception $e){
 var_dump($e);
 echo $client->__getLastRequest();
echo $client->__getLastResponse();
}
RESTful Web services
 Representational State Transfer (REST) has gained
  widespread acceptance across the Web
 REST permits many different data formats
 HTTP consists in URIs, methods, status codes …
 REST is great for clean, simple, robust services
 REST is a software architecture style used in
  developing stateless web services
 REST is an acronym standing for Representational
  State Transfer.
Architecture of REST
RESTful Web Service HTTP methods
    HTTP     CRUD       SQL

    POST      Create   INSERT

     GET      Read     SELECT

     PUT      Update   UPDATE

    DELETE    Delete   DELETE
Data Format Supported By REST
 xml – almost any programming language can read
  XML
 json – useful for JavaScript and increasingly PHP apps.
 csv – open with spreadsheet programs
 html – a simple HTML table
 php – Representation of PHP code that can be
  eval()’ed
 serialize – Serialized data that can be unserialized in
  PHP
Different Methods to Interact with REST
    file_get_contents()
    cURL
    SimpleXml
1) File_get_contents()
<?php
$result = file_get_contents('http:// twitter
   .com/users/show/screenname');
var_dump($result);

HTTP Basic authentication you can use the following syntax to get data
  from your password protected RESTful AP
$user = json_decode(
  file_get_contents('http://admin:1234@example.com/index.php/api/use
  r/id/1/format/json')
);
echo $user->name;
REST from PHP: GET(CURL)
<?php
$ch = curl_init('http://twitter.com/users');
curl_exec($ch);
REST from PHP: DELETE
<?php
$ch = curl_init('http://example.com/users/ginny');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST,
  'DELETE');
curl_exec($ch);
Soap Vs Rest
Why REST /1
 Creating clients, developing APIs, and understanding
  documentation is much easier in REST than SOAP
 REST permits many different data formats where as
  SOAP only permits XML
 JSON is a better fit for data and parses very faster
 REST allows better support for browser clients due to
  it’s support for JSON
 REST reads can be cached, SOAP based reads cannot
  be cached.
 REST has better performance and scalability.
Why SOAP /2
 WS-Security: SOAP supports SSL (just like REST) it also
  supports WS-Security which adds some enterprise security
  features.
 WS-AtomicTransaction: Need ACID Transactions over a service
  then you need SOAP. While REST supports transactions, it isn’t
  as comprehensive and isn’t ACID compliant
 WS-ReliableMessaging: Rest doesn’t have a standard
  messaging system and expects clients to deal with
  communication failures by retrying. SOAP has successful/retry
  logic built in and provides end-to-end reliability even through
  SOAP intermediaries.
SOAP Vs REST /3
 In Summary, SOAP is clearly useful, and important.
 For instance, if I was writing an iPhone application to
 interface with my bank I would definitely need to use
 SOAP. All three features above are required for
 banking transactions. For example, if I was
 transferring money from one account to the other, I
 would need to be certain that it completed. Retrying it
 could be catastrophic if it succeed the first time, but
 the response failed.
Questions ???
Thankyou


Mandakini Kumari
https://www.facebook.com/mandakini.kumari
http://www.slideshare.net/mandakinikumari
http://www.linkedin.com/pub/mandakini-kumari/18/93/935

More Related Content

What's hot

SOAP vs REST
SOAP vs RESTSOAP vs REST
SOAP vs REST
Nadia Boumaza
 
Soap web service
Soap web serviceSoap web service
Soap web service
NITT, KAMK
 
SOAP-based Web Services
SOAP-based Web ServicesSOAP-based Web Services
SOAP-based Web Services
Katrien Verbert
 
Web Services - A brief overview
Web Services -  A brief overviewWeb Services -  A brief overview
Web Services - A brief overview
Raveendra Bhat
 
Web service
Web serviceWeb service
Web Service
Web ServiceWeb Service
Web Service
Ashwani kumar
 
Java web services
Java web servicesJava web services
Java web services
kumar gaurav
 
REST vs SOAP
REST vs SOAPREST vs SOAP
REST vs SOAP
Juan Luis Pérez
 
Restful web services by Sreeni Inturi
Restful web services by Sreeni InturiRestful web services by Sreeni Inturi
Restful web services by Sreeni Inturi
Sreeni I
 
SOAP--Simple Object Access Protocol
SOAP--Simple Object Access ProtocolSOAP--Simple Object Access Protocol
SOAP--Simple Object Access Protocol
Masud Rahman
 
Restful web services ppt
Restful web services pptRestful web services ppt
Web Services (SOAP, WSDL, UDDI)
Web Services (SOAP, WSDL, UDDI)Web Services (SOAP, WSDL, UDDI)
Web Services (SOAP, WSDL, UDDI)
Peter R. Egli
 
Simple Object Access Protocol (SOAP)
Simple Object Access Protocol (SOAP)Simple Object Access Protocol (SOAP)
Simple Object Access Protocol (SOAP)
Mehul Boricha
 
Intro to web services
Intro to web servicesIntro to web services
Intro to web services
Neil Ghosh
 
Web services - A Practical Approach
Web services - A Practical ApproachWeb services - A Practical Approach
Web services - A Practical Approach
Madhaiyan Muthu
 
Rest vs Soap
Rest vs SoapRest vs Soap
Rest vs Soap
Alex Pérez Barón
 
Overview of java web services
Overview of java web servicesOverview of java web services
Rest and the hypermedia constraint
Rest and the hypermedia constraintRest and the hypermedia constraint
Rest and the hypermedia constraint
Inviqa
 
REST & RESTful Web Service
REST & RESTful Web ServiceREST & RESTful Web Service
REST & RESTful Web Service
Hoan Vu Tran
 
Restful webservices
Restful webservicesRestful webservices
Restful webservices
Luqman Shareef
 

What's hot (20)

SOAP vs REST
SOAP vs RESTSOAP vs REST
SOAP vs REST
 
Soap web service
Soap web serviceSoap web service
Soap web service
 
SOAP-based Web Services
SOAP-based Web ServicesSOAP-based Web Services
SOAP-based Web Services
 
Web Services - A brief overview
Web Services -  A brief overviewWeb Services -  A brief overview
Web Services - A brief overview
 
Web service
Web serviceWeb service
Web service
 
Web Service
Web ServiceWeb Service
Web Service
 
Java web services
Java web servicesJava web services
Java web services
 
REST vs SOAP
REST vs SOAPREST vs SOAP
REST vs SOAP
 
Restful web services by Sreeni Inturi
Restful web services by Sreeni InturiRestful web services by Sreeni Inturi
Restful web services by Sreeni Inturi
 
SOAP--Simple Object Access Protocol
SOAP--Simple Object Access ProtocolSOAP--Simple Object Access Protocol
SOAP--Simple Object Access Protocol
 
Restful web services ppt
Restful web services pptRestful web services ppt
Restful web services ppt
 
Web Services (SOAP, WSDL, UDDI)
Web Services (SOAP, WSDL, UDDI)Web Services (SOAP, WSDL, UDDI)
Web Services (SOAP, WSDL, UDDI)
 
Simple Object Access Protocol (SOAP)
Simple Object Access Protocol (SOAP)Simple Object Access Protocol (SOAP)
Simple Object Access Protocol (SOAP)
 
Intro to web services
Intro to web servicesIntro to web services
Intro to web services
 
Web services - A Practical Approach
Web services - A Practical ApproachWeb services - A Practical Approach
Web services - A Practical Approach
 
Rest vs Soap
Rest vs SoapRest vs Soap
Rest vs Soap
 
Overview of java web services
Overview of java web servicesOverview of java web services
Overview of java web services
 
Rest and the hypermedia constraint
Rest and the hypermedia constraintRest and the hypermedia constraint
Rest and the hypermedia constraint
 
REST & RESTful Web Service
REST & RESTful Web ServiceREST & RESTful Web Service
REST & RESTful Web Service
 
Restful webservices
Restful webservicesRestful webservices
Restful webservices
 

Viewers also liked

Restful Web Service
Restful Web ServiceRestful Web Service
Restful Web Service
Bin Cai
 
OAuth: Trust Issues
OAuth: Trust IssuesOAuth: Trust Issues
OAuth: Trust Issues
Lorna Mitchell
 
Modularizing RESTful Web Service Management with Aspect Oriented Programming
Modularizing RESTful Web Service Management with Aspect Oriented ProgrammingModularizing RESTful Web Service Management with Aspect Oriented Programming
Modularizing RESTful Web Service Management with Aspect Oriented Programming
Widhian Bramantya
 
Web of Science: REST or SOAP?
Web of Science: REST or SOAP?Web of Science: REST or SOAP?
Web of Science: REST or SOAP?
Duncan Hull
 
Spring Web Services: SOAP vs. REST
Spring Web Services: SOAP vs. RESTSpring Web Services: SOAP vs. REST
Spring Web Services: SOAP vs. REST
Sam Brannen
 
10 Benefits of Automated Testing
10 Benefits of Automated Testing10 Benefits of Automated Testing
10 Benefits of Automated Testing
TestObject - Mobile Testing
 
Restful Web Services
Restful Web ServicesRestful Web Services
Restful Web Services
Angelin R
 
Microservices - Death of the Enterprise Service Bus (ESB)? (Update 2016)
Microservices - Death of the Enterprise Service Bus (ESB)? (Update 2016)Microservices - Death of the Enterprise Service Bus (ESB)? (Update 2016)
Microservices - Death of the Enterprise Service Bus (ESB)? (Update 2016)
Kai Wähner
 
REST to RESTful Web Service
REST to RESTful Web ServiceREST to RESTful Web Service
REST to RESTful Web Service
家弘 周
 
Web Services PHP Tutorial
Web Services PHP TutorialWeb Services PHP Tutorial
Web Services PHP Tutorial
Lorna Mitchell
 
REST & RESTful Web Services
REST & RESTful Web ServicesREST & RESTful Web Services
REST & RESTful Web Services
Halil Burak Cetinkaya
 
RESTful Web Services
RESTful Web ServicesRESTful Web Services
RESTful Web Services
Christopher Bartling
 
RESTful API Design, Second Edition
RESTful API Design, Second EditionRESTful API Design, Second Edition
RESTful API Design, Second Edition
Apigee | Google Cloud
 
PHP and Web Services
PHP and Web ServicesPHP and Web Services
PHP and Web Services
Bruno Pedro
 
JSON and REST
JSON and RESTJSON and REST
JSON and REST
Robert MacLean
 
Best topics for seminar
Best topics for seminarBest topics for seminar
Best topics for seminar
shilpi nagpal
 

Viewers also liked (16)

Restful Web Service
Restful Web ServiceRestful Web Service
Restful Web Service
 
OAuth: Trust Issues
OAuth: Trust IssuesOAuth: Trust Issues
OAuth: Trust Issues
 
Modularizing RESTful Web Service Management with Aspect Oriented Programming
Modularizing RESTful Web Service Management with Aspect Oriented ProgrammingModularizing RESTful Web Service Management with Aspect Oriented Programming
Modularizing RESTful Web Service Management with Aspect Oriented Programming
 
Web of Science: REST or SOAP?
Web of Science: REST or SOAP?Web of Science: REST or SOAP?
Web of Science: REST or SOAP?
 
Spring Web Services: SOAP vs. REST
Spring Web Services: SOAP vs. RESTSpring Web Services: SOAP vs. REST
Spring Web Services: SOAP vs. REST
 
10 Benefits of Automated Testing
10 Benefits of Automated Testing10 Benefits of Automated Testing
10 Benefits of Automated Testing
 
Restful Web Services
Restful Web ServicesRestful Web Services
Restful Web Services
 
Microservices - Death of the Enterprise Service Bus (ESB)? (Update 2016)
Microservices - Death of the Enterprise Service Bus (ESB)? (Update 2016)Microservices - Death of the Enterprise Service Bus (ESB)? (Update 2016)
Microservices - Death of the Enterprise Service Bus (ESB)? (Update 2016)
 
REST to RESTful Web Service
REST to RESTful Web ServiceREST to RESTful Web Service
REST to RESTful Web Service
 
Web Services PHP Tutorial
Web Services PHP TutorialWeb Services PHP Tutorial
Web Services PHP Tutorial
 
REST & RESTful Web Services
REST & RESTful Web ServicesREST & RESTful Web Services
REST & RESTful Web Services
 
RESTful Web Services
RESTful Web ServicesRESTful Web Services
RESTful Web Services
 
RESTful API Design, Second Edition
RESTful API Design, Second EditionRESTful API Design, Second Edition
RESTful API Design, Second Edition
 
PHP and Web Services
PHP and Web ServicesPHP and Web Services
PHP and Web Services
 
JSON and REST
JSON and RESTJSON and REST
JSON and REST
 
Best topics for seminar
Best topics for seminarBest topics for seminar
Best topics for seminar
 

Similar to Web services soap and rest by mandakini for TechGig

Web Programming
Web ProgrammingWeb Programming
Web Programming
VijayapriyaP1
 
Day1 : web service basics
Day1 :  web service basics Day1 :  web service basics
Day1 : web service basics
Testing World
 
REST: So What's It All About? (SAP TechEd 2011, MOB107)
REST: So What's It All About? (SAP TechEd 2011, MOB107)REST: So What's It All About? (SAP TechEd 2011, MOB107)
REST: So What's It All About? (SAP TechEd 2011, MOB107)
Sascha Wenninger
 
REST vs WS-*: Myths Facts and Lies
REST vs WS-*: Myths Facts and LiesREST vs WS-*: Myths Facts and Lies
REST vs WS-*: Myths Facts and Lies
Paul Fremantle
 
Service Oriented Architecture
Service Oriented ArchitectureService Oriented Architecture
Service Oriented Architecture
Luqman Shareef
 
Rest web service
Rest web serviceRest web service
Rest web service
Hamid Ghorbani
 
Exchange of data over internet using web service(e.g., soap and rest) in SAS ...
Exchange of data over internet using web service(e.g., soap and rest) in SAS ...Exchange of data over internet using web service(e.g., soap and rest) in SAS ...
Exchange of data over internet using web service(e.g., soap and rest) in SAS ...
Kevin Lee
 
Restful web-services
Restful web-servicesRestful web-services
Restful web-services
rporwal
 
Web services for developer
Web services for developerWeb services for developer
Web services for developer
Rafiq Ahmed
 
Web services and SOA
Web services and SOAWeb services and SOA
Web services and SOA
Subin Sugunan
 
Service Oriented Architecture Updated Luqman
Service Oriented Architecture Updated  LuqmanService Oriented Architecture Updated  Luqman
Service Oriented Architecture Updated Luqman
guesteb791b
 
Web services - REST and SOAP
Web services - REST and SOAPWeb services - REST and SOAP
Web services - REST and SOAP
Compare Infobase Limited
 
SOA and web services
SOA and web servicesSOA and web services
SOA and web services
Sreekanth Narayanan
 
Day03 api
Day03   apiDay03   api
Introduction to soapui and webservices
Introduction to soapui  and webservicesIntroduction to soapui  and webservices
Introduction to soapui and webservices
Anil Yadav
 
Introduction To REST
Introduction To RESTIntroduction To REST
Introduction To REST
rainynovember12
 
REST full API Design
REST full API DesignREST full API Design
REST full API Design
Christian Guenther
 
Webservices in SalesForce (part 1)
Webservices in SalesForce (part 1)Webservices in SalesForce (part 1)
Webservices in SalesForce (part 1)
Mindfire Solutions
 
How APIs Can Be Secured in Mobile Environments
How APIs Can Be Secured in Mobile EnvironmentsHow APIs Can Be Secured in Mobile Environments
How APIs Can Be Secured in Mobile Environments
WSO2
 
Time to REST: testing web services
Time to REST: testing web servicesTime to REST: testing web services
Time to REST: testing web services
Iurii Kutelmakh
 

Similar to Web services soap and rest by mandakini for TechGig (20)

Web Programming
Web ProgrammingWeb Programming
Web Programming
 
Day1 : web service basics
Day1 :  web service basics Day1 :  web service basics
Day1 : web service basics
 
REST: So What's It All About? (SAP TechEd 2011, MOB107)
REST: So What's It All About? (SAP TechEd 2011, MOB107)REST: So What's It All About? (SAP TechEd 2011, MOB107)
REST: So What's It All About? (SAP TechEd 2011, MOB107)
 
REST vs WS-*: Myths Facts and Lies
REST vs WS-*: Myths Facts and LiesREST vs WS-*: Myths Facts and Lies
REST vs WS-*: Myths Facts and Lies
 
Service Oriented Architecture
Service Oriented ArchitectureService Oriented Architecture
Service Oriented Architecture
 
Rest web service
Rest web serviceRest web service
Rest web service
 
Exchange of data over internet using web service(e.g., soap and rest) in SAS ...
Exchange of data over internet using web service(e.g., soap and rest) in SAS ...Exchange of data over internet using web service(e.g., soap and rest) in SAS ...
Exchange of data over internet using web service(e.g., soap and rest) in SAS ...
 
Restful web-services
Restful web-servicesRestful web-services
Restful web-services
 
Web services for developer
Web services for developerWeb services for developer
Web services for developer
 
Web services and SOA
Web services and SOAWeb services and SOA
Web services and SOA
 
Service Oriented Architecture Updated Luqman
Service Oriented Architecture Updated  LuqmanService Oriented Architecture Updated  Luqman
Service Oriented Architecture Updated Luqman
 
Web services - REST and SOAP
Web services - REST and SOAPWeb services - REST and SOAP
Web services - REST and SOAP
 
SOA and web services
SOA and web servicesSOA and web services
SOA and web services
 
Day03 api
Day03   apiDay03   api
Day03 api
 
Introduction to soapui and webservices
Introduction to soapui  and webservicesIntroduction to soapui  and webservices
Introduction to soapui and webservices
 
Introduction To REST
Introduction To RESTIntroduction To REST
Introduction To REST
 
REST full API Design
REST full API DesignREST full API Design
REST full API Design
 
Webservices in SalesForce (part 1)
Webservices in SalesForce (part 1)Webservices in SalesForce (part 1)
Webservices in SalesForce (part 1)
 
How APIs Can Be Secured in Mobile Environments
How APIs Can Be Secured in Mobile EnvironmentsHow APIs Can Be Secured in Mobile Environments
How APIs Can Be Secured in Mobile Environments
 
Time to REST: testing web services
Time to REST: testing web servicesTime to REST: testing web services
Time to REST: testing web services
 

More from Mandakini Kumari

Emerging Trends In Cloud Computing.pptx
Emerging Trends In Cloud Computing.pptxEmerging Trends In Cloud Computing.pptx
Emerging Trends In Cloud Computing.pptx
Mandakini Kumari
 
Building an Edge Computing Strategy - Distributed infrastructure.pptx
Building an Edge Computing Strategy - Distributed infrastructure.pptxBuilding an Edge Computing Strategy - Distributed infrastructure.pptx
Building an Edge Computing Strategy - Distributed infrastructure.pptx
Mandakini Kumari
 
Emerging Trends in Cloud Computing.pptx
Emerging Trends in Cloud Computing.pptxEmerging Trends in Cloud Computing.pptx
Emerging Trends in Cloud Computing.pptx
Mandakini Kumari
 
Women in IT & Inspirational Individual of the Year.pptx
Women in IT & Inspirational Individual of the Year.pptxWomen in IT & Inspirational Individual of the Year.pptx
Women in IT & Inspirational Individual of the Year.pptx
Mandakini Kumari
 
Big data with hadoop Setup on Ubuntu 12.04
Big data with hadoop Setup on Ubuntu 12.04Big data with hadoop Setup on Ubuntu 12.04
Big data with hadoop Setup on Ubuntu 12.04
Mandakini Kumari
 
Html5 drupal7 with mandakini kumari(1)
Html5 drupal7 with mandakini kumari(1)Html5 drupal7 with mandakini kumari(1)
Html5 drupal7 with mandakini kumari(1)
Mandakini Kumari
 
Php basic for vit university
Php basic for vit universityPhp basic for vit university
Php basic for vit university
Mandakini Kumari
 
Drupal7 an introduction by ayushiinfotech
Drupal7 an introduction by ayushiinfotechDrupal7 an introduction by ayushiinfotech
Drupal7 an introduction by ayushiinfotech
Mandakini Kumari
 
Introduction of drupal7 by ayushi infotech
Introduction of drupal7 by ayushi infotechIntroduction of drupal7 by ayushi infotech
Introduction of drupal7 by ayushi infotech
Mandakini Kumari
 
Drupal 7 theme by ayushi infotech
Drupal 7 theme by ayushi infotechDrupal 7 theme by ayushi infotech
Drupal 7 theme by ayushi infotech
Mandakini Kumari
 

More from Mandakini Kumari (10)

Emerging Trends In Cloud Computing.pptx
Emerging Trends In Cloud Computing.pptxEmerging Trends In Cloud Computing.pptx
Emerging Trends In Cloud Computing.pptx
 
Building an Edge Computing Strategy - Distributed infrastructure.pptx
Building an Edge Computing Strategy - Distributed infrastructure.pptxBuilding an Edge Computing Strategy - Distributed infrastructure.pptx
Building an Edge Computing Strategy - Distributed infrastructure.pptx
 
Emerging Trends in Cloud Computing.pptx
Emerging Trends in Cloud Computing.pptxEmerging Trends in Cloud Computing.pptx
Emerging Trends in Cloud Computing.pptx
 
Women in IT & Inspirational Individual of the Year.pptx
Women in IT & Inspirational Individual of the Year.pptxWomen in IT & Inspirational Individual of the Year.pptx
Women in IT & Inspirational Individual of the Year.pptx
 
Big data with hadoop Setup on Ubuntu 12.04
Big data with hadoop Setup on Ubuntu 12.04Big data with hadoop Setup on Ubuntu 12.04
Big data with hadoop Setup on Ubuntu 12.04
 
Html5 drupal7 with mandakini kumari(1)
Html5 drupal7 with mandakini kumari(1)Html5 drupal7 with mandakini kumari(1)
Html5 drupal7 with mandakini kumari(1)
 
Php basic for vit university
Php basic for vit universityPhp basic for vit university
Php basic for vit university
 
Drupal7 an introduction by ayushiinfotech
Drupal7 an introduction by ayushiinfotechDrupal7 an introduction by ayushiinfotech
Drupal7 an introduction by ayushiinfotech
 
Introduction of drupal7 by ayushi infotech
Introduction of drupal7 by ayushi infotechIntroduction of drupal7 by ayushi infotech
Introduction of drupal7 by ayushi infotech
 
Drupal 7 theme by ayushi infotech
Drupal 7 theme by ayushi infotechDrupal 7 theme by ayushi infotech
Drupal 7 theme by ayushi infotech
 

Recently uploaded

Trusted Execution Environment for Decentralized Process Mining
Trusted Execution Environment for Decentralized Process MiningTrusted Execution Environment for Decentralized Process Mining
Trusted Execution Environment for Decentralized Process Mining
LucaBarbaro3
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
akankshawande
 
A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024
Intelisync
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
MichaelKnudsen27
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
panagenda
 
WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
Postman
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
Jakub Marek
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
Zilliz
 
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Tatiana Kojar
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Alpen-Adria-Universität
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
Ivanti
 
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStrDeep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
saastr
 
Operating System Used by Users in day-to-day life.pptx
Operating System Used by Users in day-to-day life.pptxOperating System Used by Users in day-to-day life.pptx
Operating System Used by Users in day-to-day life.pptx
Pravash Chandra Das
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
Zilliz
 
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxOcean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
SitimaJohn
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
Hiroshi SHIBATA
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Tosin Akinosho
 
AWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptxAWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptx
HarisZaheer8
 
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...Letter and Document Automation for Bonterra Impact Management (fka Social Sol...
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...
Jeffrey Haguewood
 

Recently uploaded (20)

Trusted Execution Environment for Decentralized Process Mining
Trusted Execution Environment for Decentralized Process MiningTrusted Execution Environment for Decentralized Process Mining
Trusted Execution Environment for Decentralized Process Mining
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
 
A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
 
WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
 
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
 
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStrDeep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
 
Operating System Used by Users in day-to-day life.pptx
Operating System Used by Users in day-to-day life.pptxOperating System Used by Users in day-to-day life.pptx
Operating System Used by Users in day-to-day life.pptx
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
 
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxOcean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
 
AWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptxAWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptx
 
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...Letter and Document Automation for Bonterra Impact Management (fka Social Sol...
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...
 

Web services soap and rest by mandakini for TechGig

  • 1. Mandakini Kumari June 15th 2012
  • 2. Who am I  Have 9 + years of experience in open source specially PHP, Drupal & Web Services.  Active crusader to improve effectiveness and reach of Free & Open Source Software(FOSS).  Impart industrial consultancy for best use of software application.  Frequently conduct training for students and industrial experts.
  • 3. What am I going to talk about ?  Use of Web Services ?  What is Web Services  Different Ways: SOAP & REST  SOAP Vs REST  How am I going to use REST  Example: Twitter, Paypal
  • 4. Use of Web Services(WS)  Payment Gateway integration for E-commerce site.  Google Map for a Real Estate Site.  Product detail for a price comparison website  Weather forecast for a news or blog site  Mashup: Combine data from one or more source and integrate application
  • 5. Payment Gateway integration http://paypal.com
  • 6. Why WS for Payment getaway  Very Fast  Very Reliable  Secure  User don’t know what getway used by the site  User don’t need to register on payment site e.g. paypal  Website Administration is very easy e.g. IRCT with netbanking ICICI
  • 7. Google Map Web services for your website
  • 8. Top APIs for Mashups http://programmableweb.com/apis
  • 9. What is Web Services(WS)  WS serves as an interface to software developers.  Using WS as an API you can convert applications into web-applications.  WS is the vision of ‘Future Internet’  The basic Web services platform is XML + HTTP.  WS is future for Mobile application
  • 10.
  • 11. What is SOAP  SOAP is a simple XML-based protocol to let applications exchange information over HTTP  Businesses can register their WS on UDDI(Universal Description, Discovery and Integration) and provide documentation with WSDL (Web Services Description Language).  SOAP is mostly used for Enterprise applications to integrate wide types and another trend is to integrate with legacy systems
  • 15. A SOAP Envelope  <?xml version="1.0"?> <soap:Envelope xmlns:soap="http://www.w3.org/2001/12/soap-envelope" soap:encodingStyle="http://www.w3.org/2001/12/soap- encoding"> .... </soap:Envelope>
  • 16. SOAP Header Element  <SOAP-ENV:Header> <RequesterCredentials xmlns=”urn:ebay:api:PayPalAPI” xsi:type=”ebl:CustomSecurityHeaderType”> <Credentials xmlns=”urn:ebay:apis:eBLBaseComponents” xsi:type=”ebl:UserIdPasswordType”> <Username>api_username</Username> <Password>api_password</Password> <Signature>api_signature</Signature> <Subject>authorizing_account_emailaddress</Subject> </Credentials> </RequesterCredentials> </SOAP-ENV:Header>
  • 17. SOAP Body Request Element  <soap:Body> <m:GetPrice mlns:m="http://www.example.com/prices"> <m:Item>Laptop</m:Item> </m:GetPrice> </soap:Body>
  • 18. A SOAP Response  HTTP/1.1 200 OK Content-Type: application/soap+xml; charset=utf-8 Content-Length: nnn <?xml version="1.0"?> <soap:Envelope xmlns:soap="http://www.w3.org/2001/12/soap-envelope" soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding"> <soap:Body> <m:GetPriceResponse xmlns:m="http://www.example.com/prices"> <m:Price>$900</m:Price> </m:GetPriceResponse> </soap:Body> </soap:Envelope>
  • 19. PHP SOAP Server Example $server = new SoapServer("Library.wsdl",array("classmap"=>$classmap)); $server->addFunction("searchAuthors"); $server->addFunction("searchBooks"); $server->handle();
  • 20. PHP SOAP Client Example $client=new SoapClient("http://localhost/Library.wsdl",array("trace" => 1)); try { //$response = $client->searchAuthors("Beh"); $response = $client->searchBooks("te"); var_dump($response); echo htmlspecialchars($client->__getLastRequest()).""; echo htmlspecialchars($client->__getLastResponse()).""; }catch(Exception $e){ var_dump($e); echo $client->__getLastRequest(); echo $client->__getLastResponse(); }
  • 21. RESTful Web services  Representational State Transfer (REST) has gained widespread acceptance across the Web  REST permits many different data formats  HTTP consists in URIs, methods, status codes …  REST is great for clean, simple, robust services  REST is a software architecture style used in developing stateless web services  REST is an acronym standing for Representational State Transfer.
  • 23. RESTful Web Service HTTP methods HTTP CRUD SQL POST Create INSERT GET Read SELECT PUT Update UPDATE DELETE Delete DELETE
  • 24. Data Format Supported By REST  xml – almost any programming language can read XML  json – useful for JavaScript and increasingly PHP apps.  csv – open with spreadsheet programs  html – a simple HTML table  php – Representation of PHP code that can be eval()’ed  serialize – Serialized data that can be unserialized in PHP
  • 25. Different Methods to Interact with REST  file_get_contents()  cURL  SimpleXml
  • 26. 1) File_get_contents() <?php $result = file_get_contents('http:// twitter .com/users/show/screenname'); var_dump($result); HTTP Basic authentication you can use the following syntax to get data from your password protected RESTful AP $user = json_decode( file_get_contents('http://admin:1234@example.com/index.php/api/use r/id/1/format/json') ); echo $user->name;
  • 27. REST from PHP: GET(CURL) <?php $ch = curl_init('http://twitter.com/users'); curl_exec($ch);
  • 28. REST from PHP: DELETE <?php $ch = curl_init('http://example.com/users/ginny'); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE'); curl_exec($ch);
  • 30. Why REST /1  Creating clients, developing APIs, and understanding documentation is much easier in REST than SOAP  REST permits many different data formats where as SOAP only permits XML  JSON is a better fit for data and parses very faster  REST allows better support for browser clients due to it’s support for JSON  REST reads can be cached, SOAP based reads cannot be cached.  REST has better performance and scalability.
  • 31. Why SOAP /2  WS-Security: SOAP supports SSL (just like REST) it also supports WS-Security which adds some enterprise security features.  WS-AtomicTransaction: Need ACID Transactions over a service then you need SOAP. While REST supports transactions, it isn’t as comprehensive and isn’t ACID compliant  WS-ReliableMessaging: Rest doesn’t have a standard messaging system and expects clients to deal with communication failures by retrying. SOAP has successful/retry logic built in and provides end-to-end reliability even through SOAP intermediaries.
  • 32. SOAP Vs REST /3  In Summary, SOAP is clearly useful, and important. For instance, if I was writing an iPhone application to interface with my bank I would definitely need to use SOAP. All three features above are required for banking transactions. For example, if I was transferring money from one account to the other, I would need to be certain that it completed. Retrying it could be catastrophic if it succeed the first time, but the response failed.