SlideShare uma empresa Scribd logo
1 de 31
Baixar para ler offline
Introduction to SOAP
by H. Fırat Güvence
Simple Object Access Protocol
What is SOAP?
• SOAP stands for Simple Object Access Protocol
• Simply;
 ▫ XML formatted message in order to exchange
   information among applications or services.
• SOAP is a standard that defines the Web
  Services protocol. While HTTP is the low-level
  protocol, also used by the Internet, SOAP is the
  specific format for exchanging Web Services
  data over this protocol
What is SOAP?
•   SOAP is a communication protocol
•   SOAP is for communication between applications
•   SOAP is a format for sending messages
•   SOAP communicates via Internet
•   SOAP is platform independent
•   SOAP is language independent
•   SOAP is based on XML
•   SOAP is simple and extensible
•   SOAP allows you to get around firewalls
•   SOAP is a W3C recommendation
A little bit about its history
• SOAP was originally designed by Dave Winer,
  Don Box, Bob Atkinson, and Mohsen Al-Ghosein
  in 1998, with backing from Microsoft (where
  Atkinson worked at the time), as an object-
  access protocol.
• The SOAP specification is currently maintained
  by the XML Protocol Working Group of the
  World Wide Web Consortium.
• SOAP is now recommonded by W3C
Advantages
• Using SOAP over HTTP allows for easier
  communication through proxies and firewalls than
  previous remote execution technology (but not
  required!).
• SOAP is versatile enough to allow for the use of
  different transport protocols. The standard stacks
  use HTTP as a transport protocol, but other
  protocols are also usable (e.g. SMTP, RSS).
• SOAP is platform independent.
• SOAP is language independent.
• SOAP is simple and extensible.
Disadvantages
• SOAP can be considerably slower than competing middleware technologies.
• When relying on HTTP as a transport protocol and not using WS-
  Addressing or an ESB, the roles of the interacting parties are fixed. Only
  one party (the client) can use the services of the other. Developers must use
  polling instead of notification in these common cases.
• Most uses of HTTP as a transport protocol are done in ignorance of how the
  operation would be modeled in HTTP. This is by design (with analogy to
  how different protocols sit on top of each other in the IP stack), but the
  analogy is imperfect (because the application protocols used as transport
  protocols are not really transport protocols). Because of this, there is no way
  to know if the method used is appropriate to the operation. This makes
  good analysis of the operation at the application-protocol level problematic
  at best with results that are sub-optimal (if the POST-based binding is used
  for an application which in HTTP would be more naturally modeled as a
  GET operation).
• Although SOAP is an open standard, not all languages offer appropriate
  support. Java, .NET and Flex offer excellent SOAP integration and/or IDE
  support. Python and PHP support is much weaker.
Mutual Relations
 • WSDL is to list available services
 • SOAP is a protocol in order to exchange
   information through defined services by WSDL
   (is not always true)
…
<binding name="CustomerSOAPBinding“ interface="tns:CustomerInterface“ type=http://www.w3.org/2006/01/wsdl/soap
                                           wsoap:protocol="http://www.w3.org/2003/05/soap/bindings/HTTP">
      <operation ref="tns:getCustomerAddress“ wsoap:mep="http://www.w3.org/2003/05/soap/mep/soap-response"/>
</binding>
<service name="CustomerService“ interface="tns:CustomerInterface">
      <endpoint name="CustomerEndpoint“ binding="tns:CustomerSOAPBinding" address=http://soa-in-practice.com/customer20 />
</service>
…
Some Technical Specifications
• Syntax
 ▫ A SOAP message MUST be encoded using XML
 ▫ A SOAP message MUST use the SOAP Envelope
   namespace
 ▫ A SOAP message MUST use the SOAP Encoding
   namespace
 ▫ A SOAP message must NOT contain a DTD
   reference
 ▫ A SOAP message must NOT contain XML
   Processing Instructions
Some Technical Specifications
<?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:Header>
...
</soap:Header>

<soap:Body>
...
  <soap:Fault>
  ...
  </soap:Fault>
</soap:Body>

</soap:Envelope>
Some Technical Specifications
• The xmlns:soap should always have the value of:
  "http://www.w3.org/2001/12/soap-envelope".

• The namespace defines the Envelope as a SOAP Envelope.

• If a different namespace is used, the application generates an
  error and discards the message.
• The encodingStyle attribute is used to define the data types used in
  the document. This attribute may appear on any SOAP
  element, and applies to the element's contents and all child
  elements.

• A SOAP message has no default encoding.
  soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding"
Some Technical Specifications
• The SOAP Header Element
 ▫ The optional SOAP Header element contains
   application-specific information (like
   authentication, payment, etc) about the message.
 ▫ If the Header element is present, it must be the
   first child element of the Envelope element.
 ▫ The mustUnderstand attribute can be used to indicate
   whether a header entry is mandatory or optional
   for the recipient to process.
 ▫ The SOAP actor attribute is used to address the
   Header element to a specific endpoint.
Some Technical Specifications
• The SOAP Header Element cont.
<?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:Header>
  <m:Trans xmlns:m="http://www.w3schools.com/transaction/"
  soap:actor="http://www.w3schools.com/appml/">234
  </m:Trans>
</soap:Header>
...
...
</soap:Envelope>
Some Technical Specifications
• The SOAP Body Element
 ▫ The required SOAP Body element contains the
   actual SOAP message intended for the ultimate
   endpoint of the message.
 ▫ Immediate child elements of the SOAP Body
   element may be namespace-qualified.
Some Technical Specifications
• The SOAP Body Element cont.
  <?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:GetPrice xmlns:m="http://www.w3schools.com/prices">
    <m:Item>Apples</m:Item>
   </m:GetPrice>
  </soap:Body>

  </soap:Envelope>
Some Technical Specifications
• The SOAP Body Element cont.
 ▫ Possible response
  <?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.w3schools.com/prices">
    <m:Price>1.90</m:Price>
   </m:GetPriceResponse>
  </soap:Body>

  </soap:Envelope>
Some Technical Specifications
• The SOAP Body Element cont.
 ▫ The SOAP Fault Element
 ▫ The optional SOAP Fault element is used to
   indicate error messages.
 ▫ If a Fault element is present, it must appear as a
   child element of the Body element. A Fault
   element can only appear once in a SOAP message.
Some Technical Specifications
• The SOAP Body Element cont.
 ▫ The SOAP Fault Element
  Sub Element     Description
  <faultcode>     A code for identifying the fault
  <faultstring>   A human readable explanation of the fault
  <faultactor>    Information about who caused the fault to happen

  <detail>        Holds application specific error information related to
                  the Body element
Some Technical Specifications
• HTTP protocol
 ▫ HTTP communicates over TCP/IP. An HTTP
     client connects to an HTTP server using TCP.
     After establishing a connection, the client can
     send an HTTP request message to the server:
 POST /item HTTP/1.1
 Content-Type: application/soap+xml; charset=utf-8
 Content-Length: 250
 ...
Some Technical Specifications
• HTTP protocol cont.
  POST /InStock HTTP/1.1
  Host: www.example.org
  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 xmlns:m="http://www.example.org/stock">
   <m:GetStockPrice>
    <m:StockName>IBM</m:StockName>
   </m:GetStockPrice>
  </soap:Body>

  </soap:Envelope>
Some Technical Specifications
• HTTP protocol cont.
  ▫ 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 xmlns:m="http://www.example.org/stock">
   <m:GetStockPriceResponse>
    <m:Price>34.5</m:Price>
   </m:GetStockPriceResponse>
  </soap:Body>

  </soap:Envelope>
Some Technical Specifications
• Manner of speaking…
    service is defined as Price getStockPrice(StockName)
    We call the service and return the Price as a type
     of int
Vendors
• Sun, Java, .NET and Flex offer excellent SOAP
  integration.
• Python and PHP support for SOAP is poor.
• Java TM API for XML Web Services, JAX-WS
  https://jax-ws.dev.java.net/nonav/jax-ws-21-
  ea3/docs/index.html
Examples, Glassfish, java
• Deploying Web Services in Glassfish
  ….
  @WebService
  public class CustomerWS {
         …
         @WebMethod
         public boolean checkCustomer(String email)
         {…}
         …
  }
• Generation of WSDL will be automated.
• The conversation of SOAP will take place without notice.
Examples, JAX-WS, java
• wsimport : The tool reads a WSDL and generates
  all the required artifacts for web service
  development, deployment, and invocation.
 ▫ After deploying at one point, this tool will read the
   WSDL and will generate classes for the client in
   order to use the service.
• Usage:
 CustomerWSService service = new CustomerWSService();
 CustomerWS customerWS = service.getCustomerWSPort();
 boolean doesHave = customerWS.checkCustomer(“hguvence@gmail.com”);
Examples, Glassfish, java
Examples, .NET
• http://www.west-
  wind.com/presentations/dotnetwebservices/Dot
  NetWebServices.asp
• http://www.15seconds.com/Issue/010430.htm
Alternatives
• REST (Representational state transfer)
 ▫ An Architectural Style, Not a Standard
• RPC (Remote Procedure Call), middleware
  technologies such as CORBA
Conclusion
• Even though it is important to know the format of SOAP,
  why and when we use it is more important.
• We use it for integrity with the world. It is like using a
  single language for benefits! Except cultural values :)
• No need to develop tools to send or to parse SOAP
  messages, big vendors already did it. And they work
  efficiently. Many people are using. So, you- use it! Don’t
  loose time!
• Tools will help you in developing services and connecting
  to them in order for you to design your services well. So
  you don’t have to worry about SOAP format at all!
References, Resources
• http://www.w3.org/TR/soap/
• specs: http://www.w3.org/TR/soap12-part1/
• http://www.w3schools.com/SOAP/soap_intro.asp
• http://searchsoa.techtarget.com/generic/0,295582,
  sid26_gci1049566,00.html
• SOA in Practice, The Art of Distributed System
  Design, August 2007, p.234-235
• http://www.xfront.com/REST-Web-Services.html
• http://en.wikipedia.org/wiki/SOAP
?
Thank You
• H. Fırat Güvence
 ▫ hguvence@gmail.com

Mais conteúdo relacionado

Mais procurados

Developing an ASP.NET Web Application
Developing an ASP.NET Web ApplicationDeveloping an ASP.NET Web Application
Developing an ASP.NET Web ApplicationRishi Kothari
 
Asp.NET Validation controls
Asp.NET Validation controlsAsp.NET Validation controls
Asp.NET Validation controlsGuddu gupta
 
SOAP--Simple Object Access Protocol
SOAP--Simple Object Access ProtocolSOAP--Simple Object Access Protocol
SOAP--Simple Object Access ProtocolMasud Rahman
 
An Introduction To Java Web Technology
An Introduction To Java Web TechnologyAn Introduction To Java Web Technology
An Introduction To Java Web Technologyvikram singh
 
SOAP - Simple Object Access Protocol
SOAP - Simple Object Access ProtocolSOAP - Simple Object Access Protocol
SOAP - Simple Object Access ProtocolAnushka Patil
 
Document Object Model
Document Object ModelDocument Object Model
Document Object ModelMayur Mudgal
 
Introduction to JavaScript
Introduction to JavaScriptIntroduction to JavaScript
Introduction to JavaScriptAndres Baravalle
 
Soap and restful webservice
Soap and restful webserviceSoap and restful webservice
Soap and restful webserviceDong Ngoc
 
HTML/CSS/java Script/Jquery
HTML/CSS/java Script/JqueryHTML/CSS/java Script/Jquery
HTML/CSS/java Script/JqueryFAKHRUN NISHA
 
Introduction to the Web API
Introduction to the Web APIIntroduction to the Web API
Introduction to the Web APIBrad Genereaux
 
ASP.NET - Life cycle of asp
ASP.NET - Life cycle of aspASP.NET - Life cycle of asp
ASP.NET - Life cycle of asppriya Nithya
 
An Overview of Web Services: SOAP and REST
An Overview of Web Services: SOAP and REST An Overview of Web Services: SOAP and REST
An Overview of Web Services: SOAP and REST Ram Awadh Prasad, PMP
 

Mais procurados (20)

Developing an ASP.NET Web Application
Developing an ASP.NET Web ApplicationDeveloping an ASP.NET Web Application
Developing an ASP.NET Web Application
 
Client side scripting and server side scripting
Client side scripting and server side scriptingClient side scripting and server side scripting
Client side scripting and server side scripting
 
Asp.NET Validation controls
Asp.NET Validation controlsAsp.NET Validation controls
Asp.NET Validation controls
 
SOAP--Simple Object Access Protocol
SOAP--Simple Object Access ProtocolSOAP--Simple Object Access Protocol
SOAP--Simple Object Access Protocol
 
An Introduction To Java Web Technology
An Introduction To Java Web TechnologyAn Introduction To Java Web Technology
An Introduction To Java Web Technology
 
SOAP - Simple Object Access Protocol
SOAP - Simple Object Access ProtocolSOAP - Simple Object Access Protocol
SOAP - Simple Object Access Protocol
 
Document Object Model
Document Object ModelDocument Object Model
Document Object Model
 
XSLT
XSLTXSLT
XSLT
 
Introduction to JavaScript
Introduction to JavaScriptIntroduction to JavaScript
Introduction to JavaScript
 
Introduction to php
Introduction to phpIntroduction to php
Introduction to php
 
Web servers
Web serversWeb servers
Web servers
 
Soap and restful webservice
Soap and restful webserviceSoap and restful webservice
Soap and restful webservice
 
Css Ppt
Css PptCss Ppt
Css Ppt
 
HTML/CSS/java Script/Jquery
HTML/CSS/java Script/JqueryHTML/CSS/java Script/Jquery
HTML/CSS/java Script/Jquery
 
Introduction to the Web API
Introduction to the Web APIIntroduction to the Web API
Introduction to the Web API
 
What is an API?
What is an API?What is an API?
What is an API?
 
Overview of PHP and MYSQL
Overview of PHP and MYSQLOverview of PHP and MYSQL
Overview of PHP and MYSQL
 
Java script
Java scriptJava script
Java script
 
ASP.NET - Life cycle of asp
ASP.NET - Life cycle of aspASP.NET - Life cycle of asp
ASP.NET - Life cycle of asp
 
An Overview of Web Services: SOAP and REST
An Overview of Web Services: SOAP and REST An Overview of Web Services: SOAP and REST
An Overview of Web Services: SOAP and REST
 

Destaque

Introduction to SOAP
Introduction to SOAPIntroduction to SOAP
Introduction to SOAPSafwan Hashmi
 
Soap Project
Soap ProjectSoap Project
Soap Projectsamara4
 
Web Services (SOAP, WSDL, UDDI)
Web Services (SOAP, WSDL, UDDI)Web Services (SOAP, WSDL, UDDI)
Web Services (SOAP, WSDL, UDDI)Peter R. Egli
 
Small Business (Green Magic Organic Soap)
Small Business (Green Magic Organic Soap)Small Business (Green Magic Organic Soap)
Small Business (Green Magic Organic Soap)Clark Macariola
 
Marketing management project on hair oil class 12th by faizan khan
Marketing management project on hair oil class 12th by faizan khanMarketing management project on hair oil class 12th by faizan khan
Marketing management project on hair oil class 12th by faizan khanFaizan Khan
 
600.412.Lecture06
600.412.Lecture06600.412.Lecture06
600.412.Lecture06ragibhasan
 
Natural soap ppt
Natural soap pptNatural soap ppt
Natural soap pptSarah Choo
 
Herbal Soap Product Brochure
Herbal Soap Product BrochureHerbal Soap Product Brochure
Herbal Soap Product BrochureSarunya
 
Berma integrated coconut
Berma integrated coconutBerma integrated coconut
Berma integrated coconutBonnie Javier
 
Branding Planning for Black & Shine Coconut Hair Oil
Branding Planning for Black & Shine Coconut Hair OilBranding Planning for Black & Shine Coconut Hair Oil
Branding Planning for Black & Shine Coconut Hair OilRashedul Amin
 
XML Schema
XML SchemaXML Schema
XML Schemayht4ever
 
Bubbles Presentation
Bubbles PresentationBubbles Presentation
Bubbles Presentationmet_manlucu
 

Destaque (20)

Introduction to SOAP
Introduction to SOAPIntroduction to SOAP
Introduction to SOAP
 
Soap Project
Soap ProjectSoap Project
Soap Project
 
Web Services (SOAP, WSDL, UDDI)
Web Services (SOAP, WSDL, UDDI)Web Services (SOAP, WSDL, UDDI)
Web Services (SOAP, WSDL, UDDI)
 
Marketing plan soap
Marketing plan soapMarketing plan soap
Marketing plan soap
 
Soap and detergents
Soap and detergentsSoap and detergents
Soap and detergents
 
marketing plan (Soap)
marketing plan (Soap)marketing plan (Soap)
marketing plan (Soap)
 
Small Business (Green Magic Organic Soap)
Small Business (Green Magic Organic Soap)Small Business (Green Magic Organic Soap)
Small Business (Green Magic Organic Soap)
 
Marketing management project on hair oil class 12th by faizan khan
Marketing management project on hair oil class 12th by faizan khanMarketing management project on hair oil class 12th by faizan khan
Marketing management project on hair oil class 12th by faizan khan
 
SOAP Overview
SOAP OverviewSOAP Overview
SOAP Overview
 
600.412.Lecture06
600.412.Lecture06600.412.Lecture06
600.412.Lecture06
 
XML Schemas
XML SchemasXML Schemas
XML Schemas
 
Soap
SoapSoap
Soap
 
Soap xp-wg
Soap xp-wgSoap xp-wg
Soap xp-wg
 
Natural soap ppt
Natural soap pptNatural soap ppt
Natural soap ppt
 
Herbal Soap Product Brochure
Herbal Soap Product BrochureHerbal Soap Product Brochure
Herbal Soap Product Brochure
 
Berma integrated coconut
Berma integrated coconutBerma integrated coconut
Berma integrated coconut
 
Branding Planning for Black & Shine Coconut Hair Oil
Branding Planning for Black & Shine Coconut Hair OilBranding Planning for Black & Shine Coconut Hair Oil
Branding Planning for Black & Shine Coconut Hair Oil
 
XML Schema (W3C)
XML Schema (W3C)XML Schema (W3C)
XML Schema (W3C)
 
XML Schema
XML SchemaXML Schema
XML Schema
 
Bubbles Presentation
Bubbles PresentationBubbles Presentation
Bubbles Presentation
 

Semelhante a Introduction to SOAP (20)

Web-Services!.pptx
Web-Services!.pptxWeb-Services!.pptx
Web-Services!.pptx
 
Intro to web services
Intro to web servicesIntro to web services
Intro to web services
 
SOA and web services
SOA and web servicesSOA and web services
SOA and web services
 
web programming
web programmingweb programming
web programming
 
SOAP by luv
SOAP by luvSOAP by luv
SOAP by luv
 
C# ASP.NET WEB API APPLICATION DEVELOPMENT
C# ASP.NET WEB API APPLICATION DEVELOPMENTC# ASP.NET WEB API APPLICATION DEVELOPMENT
C# ASP.NET WEB API APPLICATION DEVELOPMENT
 
Overview of java web services
Overview of java web servicesOverview of java web services
Overview of java web services
 
Soap
SoapSoap
Soap
 
complete web service1.ppt
complete web service1.pptcomplete web service1.ppt
complete web service1.ppt
 
Soap service
Soap serviceSoap service
Soap service
 
SOAP WEB TECHNOLOGIES
SOAP WEB TECHNOLOGIESSOAP WEB TECHNOLOGIES
SOAP WEB TECHNOLOGIES
 
Web Programming
Web ProgrammingWeb Programming
Web Programming
 
Webservice Testing
Webservice TestingWebservice Testing
Webservice Testing
 
Web Services
Web ServicesWeb Services
Web Services
 
jkljklj
jkljkljjkljklj
jkljklj
 
Web services - REST and SOAP
Web services - REST and SOAPWeb services - REST and SOAP
Web services - REST and SOAP
 
Jee course web services
Jee course web servicesJee course web services
Jee course web services
 
Lecture 3 soap
Lecture 3 soapLecture 3 soap
Lecture 3 soap
 
Lecture 3 soap
Lecture 3 soapLecture 3 soap
Lecture 3 soap
 
Soap
SoapSoap
Soap
 

Último

Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
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
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
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
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
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
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
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
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
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 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
 
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
 
[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
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
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
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 

Último (20)

Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
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
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
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
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
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
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
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
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
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 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
 
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
 
[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
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 

Introduction to SOAP

  • 1. Introduction to SOAP by H. Fırat Güvence Simple Object Access Protocol
  • 2. What is SOAP? • SOAP stands for Simple Object Access Protocol • Simply; ▫ XML formatted message in order to exchange information among applications or services. • SOAP is a standard that defines the Web Services protocol. While HTTP is the low-level protocol, also used by the Internet, SOAP is the specific format for exchanging Web Services data over this protocol
  • 3. What is SOAP? • SOAP is a communication protocol • SOAP is for communication between applications • SOAP is a format for sending messages • SOAP communicates via Internet • SOAP is platform independent • SOAP is language independent • SOAP is based on XML • SOAP is simple and extensible • SOAP allows you to get around firewalls • SOAP is a W3C recommendation
  • 4. A little bit about its history • SOAP was originally designed by Dave Winer, Don Box, Bob Atkinson, and Mohsen Al-Ghosein in 1998, with backing from Microsoft (where Atkinson worked at the time), as an object- access protocol. • The SOAP specification is currently maintained by the XML Protocol Working Group of the World Wide Web Consortium. • SOAP is now recommonded by W3C
  • 5. Advantages • Using SOAP over HTTP allows for easier communication through proxies and firewalls than previous remote execution technology (but not required!). • SOAP is versatile enough to allow for the use of different transport protocols. The standard stacks use HTTP as a transport protocol, but other protocols are also usable (e.g. SMTP, RSS). • SOAP is platform independent. • SOAP is language independent. • SOAP is simple and extensible.
  • 6. Disadvantages • SOAP can be considerably slower than competing middleware technologies. • When relying on HTTP as a transport protocol and not using WS- Addressing or an ESB, the roles of the interacting parties are fixed. Only one party (the client) can use the services of the other. Developers must use polling instead of notification in these common cases. • Most uses of HTTP as a transport protocol are done in ignorance of how the operation would be modeled in HTTP. This is by design (with analogy to how different protocols sit on top of each other in the IP stack), but the analogy is imperfect (because the application protocols used as transport protocols are not really transport protocols). Because of this, there is no way to know if the method used is appropriate to the operation. This makes good analysis of the operation at the application-protocol level problematic at best with results that are sub-optimal (if the POST-based binding is used for an application which in HTTP would be more naturally modeled as a GET operation). • Although SOAP is an open standard, not all languages offer appropriate support. Java, .NET and Flex offer excellent SOAP integration and/or IDE support. Python and PHP support is much weaker.
  • 7. Mutual Relations • WSDL is to list available services • SOAP is a protocol in order to exchange information through defined services by WSDL (is not always true) … <binding name="CustomerSOAPBinding“ interface="tns:CustomerInterface“ type=http://www.w3.org/2006/01/wsdl/soap wsoap:protocol="http://www.w3.org/2003/05/soap/bindings/HTTP"> <operation ref="tns:getCustomerAddress“ wsoap:mep="http://www.w3.org/2003/05/soap/mep/soap-response"/> </binding> <service name="CustomerService“ interface="tns:CustomerInterface"> <endpoint name="CustomerEndpoint“ binding="tns:CustomerSOAPBinding" address=http://soa-in-practice.com/customer20 /> </service> …
  • 8. Some Technical Specifications • Syntax ▫ A SOAP message MUST be encoded using XML ▫ A SOAP message MUST use the SOAP Envelope namespace ▫ A SOAP message MUST use the SOAP Encoding namespace ▫ A SOAP message must NOT contain a DTD reference ▫ A SOAP message must NOT contain XML Processing Instructions
  • 9. Some Technical Specifications <?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:Header> ... </soap:Header> <soap:Body> ... <soap:Fault> ... </soap:Fault> </soap:Body> </soap:Envelope>
  • 10. Some Technical Specifications • The xmlns:soap should always have the value of: "http://www.w3.org/2001/12/soap-envelope". • The namespace defines the Envelope as a SOAP Envelope. • If a different namespace is used, the application generates an error and discards the message. • The encodingStyle attribute is used to define the data types used in the document. This attribute may appear on any SOAP element, and applies to the element's contents and all child elements. • A SOAP message has no default encoding. soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding"
  • 11. Some Technical Specifications • The SOAP Header Element ▫ The optional SOAP Header element contains application-specific information (like authentication, payment, etc) about the message. ▫ If the Header element is present, it must be the first child element of the Envelope element. ▫ The mustUnderstand attribute can be used to indicate whether a header entry is mandatory or optional for the recipient to process. ▫ The SOAP actor attribute is used to address the Header element to a specific endpoint.
  • 12. Some Technical Specifications • The SOAP Header Element cont. <?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:Header> <m:Trans xmlns:m="http://www.w3schools.com/transaction/" soap:actor="http://www.w3schools.com/appml/">234 </m:Trans> </soap:Header> ... ... </soap:Envelope>
  • 13. Some Technical Specifications • The SOAP Body Element ▫ The required SOAP Body element contains the actual SOAP message intended for the ultimate endpoint of the message. ▫ Immediate child elements of the SOAP Body element may be namespace-qualified.
  • 14. Some Technical Specifications • The SOAP Body Element cont. <?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:GetPrice xmlns:m="http://www.w3schools.com/prices"> <m:Item>Apples</m:Item> </m:GetPrice> </soap:Body> </soap:Envelope>
  • 15. Some Technical Specifications • The SOAP Body Element cont. ▫ Possible response <?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.w3schools.com/prices"> <m:Price>1.90</m:Price> </m:GetPriceResponse> </soap:Body> </soap:Envelope>
  • 16. Some Technical Specifications • The SOAP Body Element cont. ▫ The SOAP Fault Element ▫ The optional SOAP Fault element is used to indicate error messages. ▫ If a Fault element is present, it must appear as a child element of the Body element. A Fault element can only appear once in a SOAP message.
  • 17. Some Technical Specifications • The SOAP Body Element cont. ▫ The SOAP Fault Element Sub Element Description <faultcode> A code for identifying the fault <faultstring> A human readable explanation of the fault <faultactor> Information about who caused the fault to happen <detail> Holds application specific error information related to the Body element
  • 18. Some Technical Specifications • HTTP protocol ▫ HTTP communicates over TCP/IP. An HTTP client connects to an HTTP server using TCP. After establishing a connection, the client can send an HTTP request message to the server: POST /item HTTP/1.1 Content-Type: application/soap+xml; charset=utf-8 Content-Length: 250 ...
  • 19. Some Technical Specifications • HTTP protocol cont. POST /InStock HTTP/1.1 Host: www.example.org 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 xmlns:m="http://www.example.org/stock"> <m:GetStockPrice> <m:StockName>IBM</m:StockName> </m:GetStockPrice> </soap:Body> </soap:Envelope>
  • 20. Some Technical Specifications • HTTP protocol cont. ▫ 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 xmlns:m="http://www.example.org/stock"> <m:GetStockPriceResponse> <m:Price>34.5</m:Price> </m:GetStockPriceResponse> </soap:Body> </soap:Envelope>
  • 21. Some Technical Specifications • Manner of speaking…  service is defined as Price getStockPrice(StockName)  We call the service and return the Price as a type of int
  • 22. Vendors • Sun, Java, .NET and Flex offer excellent SOAP integration. • Python and PHP support for SOAP is poor. • Java TM API for XML Web Services, JAX-WS https://jax-ws.dev.java.net/nonav/jax-ws-21- ea3/docs/index.html
  • 23. Examples, Glassfish, java • Deploying Web Services in Glassfish …. @WebService public class CustomerWS { … @WebMethod public boolean checkCustomer(String email) {…} … } • Generation of WSDL will be automated. • The conversation of SOAP will take place without notice.
  • 24. Examples, JAX-WS, java • wsimport : The tool reads a WSDL and generates all the required artifacts for web service development, deployment, and invocation. ▫ After deploying at one point, this tool will read the WSDL and will generate classes for the client in order to use the service. • Usage: CustomerWSService service = new CustomerWSService(); CustomerWS customerWS = service.getCustomerWSPort(); boolean doesHave = customerWS.checkCustomer(“hguvence@gmail.com”);
  • 26. Examples, .NET • http://www.west- wind.com/presentations/dotnetwebservices/Dot NetWebServices.asp • http://www.15seconds.com/Issue/010430.htm
  • 27. Alternatives • REST (Representational state transfer) ▫ An Architectural Style, Not a Standard • RPC (Remote Procedure Call), middleware technologies such as CORBA
  • 28. Conclusion • Even though it is important to know the format of SOAP, why and when we use it is more important. • We use it for integrity with the world. It is like using a single language for benefits! Except cultural values :) • No need to develop tools to send or to parse SOAP messages, big vendors already did it. And they work efficiently. Many people are using. So, you- use it! Don’t loose time! • Tools will help you in developing services and connecting to them in order for you to design your services well. So you don’t have to worry about SOAP format at all!
  • 29. References, Resources • http://www.w3.org/TR/soap/ • specs: http://www.w3.org/TR/soap12-part1/ • http://www.w3schools.com/SOAP/soap_intro.asp • http://searchsoa.techtarget.com/generic/0,295582, sid26_gci1049566,00.html • SOA in Practice, The Art of Distributed System Design, August 2007, p.234-235 • http://www.xfront.com/REST-Web-Services.html • http://en.wikipedia.org/wiki/SOAP
  • 30. ?
  • 31. Thank You • H. Fırat Güvence ▫ hguvence@gmail.com