570 likes | 1.18k Views
SOAP. Overview. Agenda. ► Introduction • Software as a service • Starting with the service ► What is SOAP? • SOAP how it is • SOAP messaging framework • Extensibility • SOAP processing model • Protocol binding ► Why SOAP? ► Web Services Solution • What is the Web Service?
E N D
SOAP Overview by Szigyarto Tamas, SPBU Applied Mathematics, Department of Computer Modelling and Multiple Processors Systems
Agenda ► Introduction • Software as a service • Starting with the service ► What is SOAP? • SOAP how it is • SOAP messaging framework • Extensibility • SOAP processing model • Protocol binding ► Why SOAP? ► Web Services Solution • What is the Web Service? • Stack of layers • Demo example
SOAP -> Introduction -> Software as a service “Software as a service” What is it?
SOAP -> Introduction -> Software as a service Private IT “generating” stations
Agenda ► Introduction • Software as a service • Starting with the service ► What is SOAP? • SOAP how it is • SOAP messaging framework • Extensibility • SOAP processing model • Protocol binding ► Why SOAP? ► Web Services Solution • What is the Web Service? • Stack of layers • Demo example
•Previously The way a service was created and delivered to the customer was dictated by the available technology • Our goal To start with the service we want to provide and then work backwards into the technology SOAP -> Introduction -> Starting with the service Service oriented architecture (SOA)
SOAP -> Introduction -> Starting with the service Delivering SOA Natural way to provide SOA is to reverse above trend Choosing the technology Providing Service Backwards into the technology Working under Service we want to provide
SOAP -> Introduction -> Starting with the service Delivering SOA (2) The quote from IBM: ”So it (SOA) basically boils down to distributed computing withstandards that tell ushow to invoke different applications as services in a secure and reliable way and then howwe can link the different services together using choreography to create business processes.And then finally so that we can manage these services so that ultimately we can manageand monitor our business performance.” Resume: while this is technologically valid, it is missing the point of SOA – we are focused on the technology that enables SOA and not on SOA itself.
Agenda ► Introduction • Software as a service • Starting with the service ► What is SOAP? • SOAP how it is • SOAP messaging framework • Extensibility • SOAP processing model • Protocol binding ► Why SOAP? ► Web Services Solution • What is the Web Service? • Stack of layers • Demo example
SOAP -> What Is SOAP? -> SOAP how it is SOAP philosophy • SOAP is stands by Simple Object Access Protocol • SOAP is a simple and flexible messaging framework for transferring information specified in the form of an XML infoset between an initial SOAP sender and ultimate SOAP receiver • SOAPdoes not define any application semantics but defines the mechanism to express application messaging semantics
SOAP -> What Is SOAP? -> SOAP how it is SOAP philosophy (2) More formal SOAP definition: SOAP is a lightweight protocol intended for exchanging structuredinformation in a decentralized,distributed environment. SOAP uses XML technologies to define an extensiblemessaging framework, which provides a message construct that can beexchanged over avariety of underlying protocols. The framework has been designed to beindependent ofany particular programming model and other implementation specific semantics.
SOAP -> What Is SOAP? -> SOAP how it is SOAP terminology •Node: Enforcing the rules that govern the exchange of SOAP messages. It accesses the services provided by the underlying protocols through one or more SOAP bindings • Role: A SOAP node’s expected function in message processing • Binding: Formal set of rules for carrying a SOAP message within or on the top of another protocol (underlying protocol) for the purpose of exchange • SOAP Application: Software entity that produces, consumes or otherwise acts upon SOAP message in a manner conforming to the SOAP processing model • Message path: Set of SOAP nodes through which a single SOAP message passes
Agenda ► Introduction • Software as a service • Starting with the service ► What is SOAP? • SOAP how it is • SOAP messaging framework • Extensibility • SOAP processing model • Protocol binding ► Why SOAP? ► Web Services Solution • What is the Web Service? • Stack of layers • Demo example
Standard SOAP message: <?xml version=“1.0”?> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/> <soap:Header> <!-- optional --> <!-- header blocks go here... --> </soap:Header> <soap:Body> <!-- payload or Fault element goeshere--> </soap:Body> </soap:Envelope> SOAP -> What Is SOAP? -> SOAP messaging framework SOAP messages
SOAP -> What Is SOAP? -> SOAP messaging framework SOAP request
SOAP -> What Is SOAP? -> SOAP messaging framework SOAP response
SOAP fault codes SOAP -> What Is SOAP? -> SOAP messaging framework
SOAP -> What Is SOAP? -> SOAP messaging framework SOAP fault example
Agenda ► Introduction • Software as a service • Starting with the service ► What is SOAP? • SOAP how it is • SOAP messaging framework • Extensibility • SOAP processing model • Protocol binding ► Why SOAP? ► Web Services Solution • What is the Web Service? • Stack of layers • Demo example
SOAP -> What Is SOAP? -> Extensibility SOAP Header •Header element, like the Body element, is a generic container for control information • Elements placed in the Header are referred to as header blocks • Header should contain information that influences payload processing • Header is the right place to put some credential information that helps control access to the operation
SOAP -> What Is SOAP? -> Extensibility SOAP Header (example)
SOAP -> What Is SOAP? -> Processing Model Simple messaging scenario • SOAP defines a processing model that outlines rules for processing a SOAP message as it travels from SOAP sender to a SOAP receiver
Agenda ► Introduction • Software as a service • Starting with the service ► What is SOAP? • SOAP how it is • SOAP messaging framework • Extensibility • SOAP processing model • Protocol binding ► Why SOAP? ► Web Services Solution • What is the Web Service? • Stack of layers • Demo example
SOAP -> What Is SOAP? -> Processing Model Sophisticated SOAP messaging • However, SOAP processing model allows for more interesting architectures, which contains multiple intermediary nodes
SOAP -> What Is SOAP? -> Processing Model Intermediaries nodes
SOAP -> What Is SOAP? -> Processing Model SOAP 1.2 Roles Remark: SOAP 1.1 defines only one role next. Every node must acts as next role
Agenda ► Introduction • Software as a service • Starting with the service ► What is SOAP? • SOAP how it is • SOAP messaging framework • Extensibility • SOAP processing model • Protocol binding ► Why SOAP? ► Web Services Solution • What is the Web Service? • Stack of layers • Demo example
SOAP -> What Is SOAP? -> Protocol Bindings Protocol Bindings • each intermediary could choose to use different communication protocol without affecting the SOAP message • standard protocol binding is required to ensure high level of interoperability across SOAP applications and infrastructure • a concrete protocol binding defines exactly how SOAP message should be transmitted with given protocol • it defines the details of how SOAP fits within the scope of another protocol, which probably has its own messaging framework with a variety of headers
SOAP -> What Is SOAP? -> Protocol Bindings SOAP HTTP Bindings SOAP 1.1 specification only codifies a protocol binding for HTTP, due to its wide use Remark: the context type header for both HTTP request and response messages must be set to txt/xml (application/soap+xml in SOAP 1.2)
Agenda ► Introduction • Software as a service • Starting with the service ► What is SOAP? • SOAP how it is • SOAP messaging framework • Extensibility • SOAP processing model • Protocol binding ► Why SOAP? ► Web Services Solution • What is the Web Service? • Stack of layers • Demo example
SOAP -> Why SOAP? Industry acceptance for SOAP • developers have been able to download and use the technology, rather than just read specifications and industry analysis • SOAP changes both the way software will be developed and the way industry rivals and cooperating • many of the key industry software leaders have announced their support for SOAP, including, HP, SAP, Software AG, Sun Microsystems, and Oracle • Microsoft and IBM have lead to the release of Web Services platform, with SOAP services being the core technology in the initial releases • emergence of Web Services Definition Language (WSDL) and Universal Description, Discovery and Integration (UDDI)
SOAP -> Why SOAP? SOAP transport Most of SOAP servers currently use HTTP as the transport protocol for the XML payload in SOAP message ‘cause HTTP satisfies a number of requirements: • Ubiquity • Firewall friendliness • Simplicity • Scalability • Readily capable of being secure There are a number of SOAP implementations that support other transport layers, such as • HTTPS – using SSL provides security • SMTP – enables asynchronous SOAP requests / SOAP report It can be expected that other transport protocols, such as MSMQ or FTP, will be supported eventually. IBM has an interesting for HTTPR to provide a reliable transport layer for SOAP messages
SOAP -> Why SOAP? SOAP extensibility SOAP defines a communication framework that allows for such features to be added down the road as layeredextensions. Microsoft, IBM and other software vendors working out a common suite of SOAP extensions that will add many of these features that most developers expect. SOAP extensibility is key.
SOAP -> Why SOAP? Enterprise Application Integration (EAI) •There has been considerable speculation that current Enterprise ApplicationIntegration (EAI) products will be made redundant by SOAP. •But, there is still a role for heavy-duty,enterprise-grade EAI products that integrate with more obscure legacy systems or provideunusually high qualities of service. •Significant:SOAP will encourageand enable a whole newgeneration of EAI projects that were not previously possible dueto technical and cost constraints.
SOAP -> Why SOAP? SOAP: advantages and disadvantages Advantages • Human readable XML • Easy to debug • SOAP runs over HTTP • Firewalls not affected • Services can be written in any language, platform or operating system Disadvantages • S-L-O………………..-W • XML produces a lot of overhead for small messages • Web Services speed relies on Internet traffic conditions • Not strictly-typed XML
Agenda ► Introduction • Software as a service • Starting with the service ► What is SOAP? • SOAP how it is • SOAP messaging framework • Extensibility • SOAP processing model • Protocol binding ► Why SOAP? ► Web Services Solution • What is the Web Service? • Stack of layers • Demo example
SOAP -> Web Services Solution -> What Is the Web Service? What about definition? Each software vendor defines Web Service in a slightly different way: Gartner: “WS is loosely coupled software components that interact with one another dynamically via standard Internettechnology.” Forrest Research: “WS is a formatted connection between people, systems and applications, that expose elements of businessfunctionality as a softwareservice and createnewbusiness value.” Common feature: WS is components that you can use, re-use, mix, and match to enhance Internet and Intranet applications.
SOAP -> Web Services Solution -> What Is the Web Service? At the basic level Web Service is: • universalclient/serverarchitecture that allows disparate systems to communicate with each other without using proprietary client libraries • architecture that simplifies the development process typically associated with client/server applications by effectively eliminatingcodedependencies between client and server • architecture where server interface information is disclosed to the client via a configuration file encoded in a standard format (WSDL). Doing so allows the server to publish a single file for all target client platforms
Agenda ► Introduction • Software as a service • Starting with the service ► What is SOAP? • SOAP how it is • SOAP messaging framework • Extensibility • SOAP processing model • Protocol binding ► Why SOAP? ► Web Services Solution • What is the Web Service? • Stack of layers • Demo example
SOAP -> Web Services Solution -> Stack of Layers What’s from WebServices.org?
SOAP -> Web Services Solution -> Stack of Layers Interaction with Web Service
SOAP -> Web Services Solution -> Stack of Layers Accessing & publication
Agenda ► Introduction • Software as a service • Starting with the service ► What is SOAP? • SOAP how it is • SOAP messaging framework • Extensibility • SOAP processing model • Protocol binding ► Why SOAP? ► Web Services Solution • What is the Web Service? • Stack of layers • Demo example
SOAP -> Web Services Solution -> Example Demo service main page
SOAP -> Web Services Solution -> Example Demo service method call page
SOAP -> Web Services Solution -> Example SOAP request
SOAP -> Web Services Solution -> Example SOAP response
SOAP -> Web Services Solution -> Example HTTP POST request and response
SOAP -> Web Services Solution -> Example 2 + 3 = what’s the answer?
SOAP -> Web Services Solution -> Example Simple VB script client Something go wrong Everything alright With your message