SOAP

60 %
40 %
Information about SOAP
Education

Published on June 19, 2007

Author: Amateur

Source: authorstream.com

Simple Object Access Protocol(SOAP):  Simple Object Access Protocol (SOAP) National Grid USA Developers Lunch Group Monday Oct-21 2002 Copyright © 2002 National Grid USA Decentralized Distributed Architecture Industries Changing Needs……:  Decentralized Distributed Architecture Industries Changing Needs…… An architecture in which a server application (or service provider) can publish and describe the services it provides and a client application (service requestor) to discover and dynamically invoke these services. A communication protocol that enables applications isolated on the Internet to interoperate. Must be language and platform independent. For broad adoption and easy implementation, it must also be simple, lightweight, and provide a good integration with existing Web protocols. Decentralized Distributed ArchitectureCurrent Technologies:  Decentralized Distributed Architecture Current Technologies Microsoft DCOM ActiveX components communicate with each other in a distributed environment. DCOM is somewhat language independent: ActiveX components can theoretically be written in different languages. However, as a primarily Windows-based architecture, DCOM is not platform independent. SUN Java RMI (Remote Method Invocation) allows components written in Java to communicate with each other in a distributed environment. RMI is platform independent – Java components run on any platform that has a Java Virtual Machine – but it only supports components written in Java. OMG CORBA has been the closest thing to the much-needed federator of business applications, allows components written in any language – providing that language has a CORBA binding – and running on any platform to communicate with each other. However, its heavy weight and complex nature, along with the incompatibility between different CORBA Object Request Brokers (ORB) implementations prevented its widespread adoption. In addition, CORBA’s IIOP protocol doesn’t integrate well with existing Web standards. For example, many firewalls are reluctant to let anything but HTTP packages penetrate. In Comes… Soap!:  In Comes… Soap! It is a lightweight and simple XML-based communication protocol. It is designed to exchange information in a decentralized, distributed environment. It can be used in combination with a variety of existing internet protocols and formats including the defacto, HTTP also SMTP, FTP and JMS. SOAP Selling Points:  SOAP Selling Points Big selling point has always been that it's open, making it easy to add existing application servers and programs. It's simply easier to write programs with SOAP than it is with the other protocols. Uses HTTP/SMTP - industry accepted transport protocols that are already supported by enterprise servers and are friendly with firewalls. Independent of: Programming language, object model, operating system, or platform SOAP Message:  SOAP Message A SOAP message is an XML document that consists of a mandatory SOAP envelope, an optional SOAP header, and a mandatory SOAP body SOAP Envelope andlt;SOAP-ENV:Envelopeandgt; andlt;/SOAP-ENV:Envelopeandgt; andlt;SOAP-ENV:Headerandgt; andlt;t:Transactionandgt;5andlt;/t:Transactionandgt; andlt;/SOAP-ENV:Headerandgt; andlt;SOAP-ENV:Bodyandgt; andlt;m:GetLastTradePriceandgt; andlt;symbolandgt;XYZandlt;/symbolandgt; andlt;/m:GetLastTradePriceandgt; andlt;/SOAP-ENV:Bodyandgt; SOAP Encoding:  SOAP Encoding All SOAP messages are encoded using XML. A SOAP application should include the SOAP namespace on all elements and attributes defined by SOAP in messages that it generates. Encoding Types Simple types: Int, float, negativeInteger and string Compound types: struct, array SOAP Encoding Types:  SOAP Encoding Types andlt;e:Bookandgt; andlt;authorandgt;Henry Fordandlt;/authorandgt; andlt;introandgt;This is a book.andlt;/introandgt; andlt;/e:Bookandgt; andlt;element name='myFavoriteNumbers' type='SOAP-ENC:Array'/andgt; andlt;myFavoriteNumbers SOAP-ENC:arrayType='xsd:int[2]'andgt; andlt;numberandgt;3andlt;/numberandgt; andlt;numberandgt;4andlt;/numberandgt; andlt;/myFavoriteNumbersandgt; Compound:Struct Compound:Array andlt;element name='age' type='int'/andgt; andlt;element name='height' type='float'/andgt; andlt;element name='displacement' type='negativeInteger'/andgt; andlt;element name='color' type='string'/andgt; andlt;ageandgt;45andlt;/ageandgt; andlt;heightandgt;5.9andlt;/heightandgt; andlt;displacementandgt;-450andlt;/displacementandgt; andlt;colorandgt;Blueandlt;/colorandgt;  Simple Types SOAP for RPC:  SOAP for RPC One of the design goals of SOAP is to encapsulate and exchange RPC calls using the extensibility and flexibility of XML. An RPC call maps naturally to an HTTP request and an RPC response maps to an HTTP response. RPC method calls and responses are both carried in the SOAP body element. SOAP/XML Namespaces:  SOAP/XML Namespaces andlt;SOAP-ENV:Envelope xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/' SOAP-ENV:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'/andgt; andlt;/SOAP-ENV:Envelopeandgt; andlt;SOAP-ENV:Headerandgt; andlt;t:Transaction xmlns:t='http://www.MyWeb.com' SOAP-ENV:mustUnderstand='1'andgt;5andlt;/t:Transactionandgt; andlt;/SOAP-ENV:Headerandgt;    andlt;SOAP-ENV:Bodyandgt;        andlt;m:GetLastTradePrice xmlns:m='http://www.MyWeb.com'andgt;            andlt;symbolandgt;DEFandlt;/symbolandgt;        andlt;/m:GetLastTradePriceandgt;    andlt;/SOAP-ENV:Bodyandgt; Scopes the Message to the SOAP Namespaces Establishes type of encoding within the message Scopes the Message to the SOAP Namespaces URI of target Object Method Parameters Method Name SOAP And HTTP:  SOAP And HTTP SOAP over HTTP maps naturally to HTTP semantics rather than overriding existing semantics. SOAP naturally follows the HTTP request/response message model providing SOAP request parameters in a HTTP request and SOAP response parameters in a HTTP response. NOTE: HTTP applications MUST use the media type 'text/xml' when including SOAP entity bodies. Request And Response Model:  POST /StockQuote HTTP/1.1 Host: www.stockquoteserver.com Content-Type: text/xml; charset='utf-8' Content-Length: nnnn SOAPAction: 'http://www.myweb.com' andlt;SOAP-ENV:Envelopeandgt; andlt;/SOAP-ENV:Envelopeandgt; andlt;SOAP-ENV:Headerandgt; andlt;t:Transactionandgt;5andlt;/t:Transactionandgt; andlt;/SOAP-ENV:Headerandgt; andlt;SOAP-ENV:Bodyandgt; andlt;m:GetLastTradePriceandgt; andlt;symbolandgt;XYZandlt;/symbolandgt; andlt;/m:GetLastTradePriceandgt; andlt;/SOAP-ENV:Bodyandgt; HTTP/1.1 200 OK Content-Type: text/xml; charset='utf-8' Content-Length: nnnn andlt;SOAP-ENV:Envelopeandgt; andlt;/SOAP-ENV:Envelopeandgt; andlt;SOAP-ENV:Headerandgt; andlt;t:Transactionandgt;5andlt;/t:Transactionandgt; andlt;/SOAP-ENV:Headerandgt; andlt;SOAP-ENV:Bodyandgt; andlt;m:GetLastTradePriceResponseandgt; andlt;Priceandgt;34.5andlt;/Priceandgt; andlt;/m:GetLastTradePriceResponseandgt; andlt;/SOAP-ENV:Bodyandgt; Request And Response Model Web Services Description Language (WSDL):  Web Services Description Language (WSDL) We use WSDL (XML grammar) to create a file that identifies the services provided by the server and the set of operations within each service that the server supports. For each of the operations, the WSDL file also describes the format that the client must follow in requesting an operation. The WSDL file sets up requirements for both the server and the client, this file is like a contract between the two. The server agrees to provide certain services only if the client sends a properly formatted SOAP request. Elements in WSDL :  Elements in WSDL WSDL document uses the following elements in the definition of Network services: Types– a container for data type definitions used in exchanging messages. Message– describes the logical contents of the data being communicated. Operation– an abstract description of an action supported by the service. Port type–identifies a set of operations and the messages involved with each of the operations. Binding– a concrete protocol and data format specification for a particular port type. Port– a single endpoint defined as a combination of a binding and a network address. Service– identifies which ports to group together. Sample WSDL:  Sample WSDL presentation.wsdl Massachusetts DTE Outage Reporting Protocol :  Massachusetts DTE Outage Reporting Protocol Sep 01 2001, Department of Telecommunications and Energy Implemented the new Outage Reporting Protocol. All distribution companies have to report outages within 30 minutes. DTE ORP Overview:  DTE ORP Overview Microsoft SOAP Toolkit SOAP Client SOAP Server Our Application Web Service Operations Request Response COM Objects Listener HTTPS Sample Client Code:  Sample Client Code andlt;% Set soapClient = Server.CreateObject('MSSOAP.SoapClient') Call soapClient.mssoapinit('http://myweb.com/orpdte.wsdl') soapClient.ConnectorProperty('AuthUser') = 'johndoe' soapClient.ConnectorProperty('AuthPassword') = 'johndoe1' strReturnCode = soapClient.updateCustomerOutageInfo(arg1) strReturnCode = soapClient.closeOutage(arg1,arg2,arg3) If soapClient.faultstring andlt;andgt; '' Then sErrCode = -1 Else sErrCode = 1 End If Set soapClient = Nothing %andgt; Sample Server Code:  Sample Server Code andlt;% set soapserver = CreateObject('MSSOAP.SoapServer') wsdl = Server.MapPath('http://myweb.com/orpdte.wsdl') wsml = Server.MapPath(' http://myweb.com/orpdte.wsml') call soapserver.init(wsdl, wsml) call soapserver.SoapInvoke(request, response) %andgt; In addition to creating a Web Services Description Language (WSDL) file describing the services and operations on the server, we need to create a Web Services Meta Language (WSML) file on the server. Note The use of a WSML file is specific to Microsoft SOAP Toolkit A WSML file provides information that maps the operations of a service (as described in the WSDL file) to specific methods in the COM object. The WSML file determines which COM object to load to service the request for each operation. Universal Description, Discovery and Integration (UDDI):  Universal Description, Discovery and Integration (UDDI) Collaboration between Ariba™, Microsoft™ and IBM™ A UDDI registry can be viewed as the yellow pages for Web services. SOAP-based publishing API Allows service providers to register themselves and their services with a UDDI registry. SOAP-based discovery API Allows service subscribers to search for available services. How UDDI Works:  How UDDI Works UDDI Business Registry Service Type Registration Business Registration Software Companies, Standard bodies and programmers populate the registry with description of different type of services Businesses populate the registry with description of services they support Marketplace, search engines and business apps query the registry to discover services at other companies Unique ID for each Service and Business Registration UDDI & Soap:  UDDI andamp; Soap Registry API’s (SOAP Messages) to Create, View, Update and Delete registrations. USER UDDI Registry Node UDDI Web Service Operations UDDI SOAP Request HTTP Server UDDI SOAP Response SOAP Processor B2B Directory References:  References W3C http://www.w3.org/TR/SOAP Develop Mentor http://www.develop.com/soap Microsoft http://msdn.microsoft.com/soap IBM http://www-106.ibm.com/developerworks/xml/ UDDI http://www.uddi.org/ Other Resources http://www.xml-rpc.com/ Understanding SOAP Kenn Scribner/Mark Stiver

Add a comment

Related presentations

Related pages

SOAP – Wikipedia

SOAP (ursprünglich für Simple Object Access Protocol) ist ein Netzwerkprotokoll, mit dessen Hilfe Daten zwischen Systemen ausgetauscht und Remote ...
Read more

Web Services mit SOAP (Simple Object Access Protocol)

SOAP (Simple Object Access Protocol), WSDL (Web Services Description Language) und UDDI (Universal Description, Discovery, and Integration) + andere TechDocs
Read more

Seifenoper – Wikipedia

Eine Seifenoper ist ein serielles Unterhaltungsformat im Rundfunk – zumeist im Fernsehen, gelegentlich auch im Hörfunk –, das einmal („Weekly Soap ...
Read more

Soaps, Serien und Telenovelas - Vorschau für 6 Wochen

Die 6-Wochen-Vorschau von Soaps, Serien und Telenovelas auf Soapspoiler.de!
Read more

Soap Opera News and Updates | Soaps.com

Soaps.com is the only soap opera website with the most in depth daily updates, exclusive soap star interviews, late-breaking news articles, lively message ...
Read more

Soap (TV Series 1977–1981) - IMDb

With Katherine Helmond, Rod Roddy, Richard Mulligan, Cathryn Damon. Parody of television soap-operas--the show's humor relies on exaggerating soap-operas ...
Read more

Soap - Wikipedia, the free encyclopedia

In chemistry, soap is a salt of a fatty acid. Household uses for soaps include washing, bathing, and other types of housekeeping, where soaps act as ...
Read more

PHP: SOAP - Manual

If you are having an issue where SOAP cannot find the functions that are actually there if you view the wsdl file, it's because PHP is caching the wsdl ...
Read more

Soap.com

Norton Secured Bizrate Circle of Excellence Site - Soap.com Reviews at Bizrate BizRate Customer Certified (GOLD) Site - Soap.com Reviews at Bizrate BizRate ...
Read more

SOAP Specifications - World Wide Web Consortium

Latest SOAP versions. This page (http://www.w3.org/TR/soap) contains links to the SOAP/1.1 Note and the SOAP Version 1.2 Recommendation documents.
Read more