8 soa technisch perspectief

  • 429 views
Uploaded on

 

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
429
On Slideshare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
0
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Service Oriented ArchitectureDeel 4 – SOA vanuit technisch perspectiefLeiden19 May 2010Bas Kruiswijk
  • 2. Service Oriented ArchitectureOverzichtDeel 4: SOA vanuit technisch perspectief1. Basisconcepten2. SOA vanuit organisatorisch perspectief3. Procesbesturing4. SOA vanuit technisch perspectief – Service als technisch concept – Web services5. De SOA infrastructuur6. SOA in het ontwerpproces© Twynstra Gudde 19-5-2010 2
  • 3. Service Oriented ArchitectureServices– From a technical perspective a logical next step following object- en component technology – Broad adoption of (internet)standards for web services – Platform independant – Central concept in (almost) alle current software development platforms (for instance the Java and .NET based platforms) Visible service interface description request Service interface Service respons implementation Invisible, encapsulated internal implementation© Twynstra Gudde 19-5-2010 3
  • 4. Service Oriented ArchitectureService Visible service interface description request Service interface Service respons implementation Invisible, encapsulated internal implementation© Twynstra Gudde 19-5-2010 4
  • 5. Service Oriented ArchitectureWeb services– Web services are the most common technical implementation of a service – Web services are not the only possible technical implementation – Term Web services refers to a collection of standards that cover interoperability– Fundamental standards – XML (eXtensible Markup Language) and XSD (XML Schema Definition) – HTTP (HyperText Transfer Protocol) – WSDL (Web Service Definition Language) – SOAP (Simple Object Access Protocol) – UDDI (Universal Description, Discovery and Integration)© Twynstra Gudde 19-5-2010 5
  • 6. Service Oriented ArchitectureFundamental standards for web services (1)HTTP and XML (existed before web services) Visible service interface XML description request Service interface XML Service respons HTTP implementation Invisible, encapsulated internal implementation© Twynstra Gudde 19-5-2010 6
  • 7. Service Oriented Architecture XML Example <books>– eXtensible Markup Language <book> <author>Don Box</author> for data-exchange, -storage <title>Essential XML</title> and –presentation <price>34,95</price> </book>– General format, tag-structure <book> <author>Linus Torvalds</author>– Most other web services <title>Linux for Fun</title> <price>34,95</price> standards (and many others) </book> are based on XML </books> <ClientSuwi> <SofiNr>123456789</SofiNr> <BankGironr>01982712</BankGironr> <TelefoonnrClient> <Telefoonnr> <Netnr>020</Netnr> <Abonneenr>4890000</Abonneenr> </Telefoonnr> </TelefoonnrClient> </ClientSuwi> © Twynstra Gudde 19-5-2010 7
  • 8. Service Oriented Architecture XML and XSD (XML Schema Definition) Example<shiporder orderid="889923"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" – An XML File has axsi:noNamespaceSchemaLocation="shiporder.xsd"> "shiporder.xsd" <orderperson>John Smith</orderperson> structure <shipto> <name>Ola Nordmann</name> – An XML Schema <address>Langgt 23</address> Definition (XSD) <city>4000 Stavanger</city> <country>Norway</country> describes this structure </shipto> <item> <title>Empire Burlesque</title> <note>Special Edition</note> <quantity>1</quantity> <price>10.90</price> </item> <item> <title>Hide your heart</title> <quantity>1</quantity> <price>9.90</price> </item></shiporder> © Twynstra Gudde 19-5-2010 8
  • 9. Service Oriented Architecture XML and XSD (XML Schema Definition)<shiporder orderid="889923"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:noNamespaceSchemaLocation="shiporder.xsd"> "shiporder.xsd" Part of the XSD <xs:element name="shipto"> <orderperson>John Smith</orderperson> <xs:complexType> <shipto> <xs:sequence> <name>Ola Nordmann</name> <xs:element name="name" type="xs:string"/> <address>Langgt 23</address> <xs:element name="address" type="xs:string"/> <city>4000 Stavanger</city> <xs:element name="city" type="xs:string"/> <country>Norway</country> <xs:element name="country" type="xs:string"/> </shipto> </xs:sequence> <item> </xs:complexType> <title>Empire Burlesque</title> </xs:element> <note>Special Edition</note> <quantity>1</quantity> <price>10.90</price> <xs:element name="item" maxOccurs="unbounded"> </item> <xs:complexType> <item> <xs:sequence> <title>Hide your heart</title> <xs:element name="title" type="xs:string"/> <quantity>1</quantity> <xs:element name="note" type="xs:string" minOccurs="0"/> <price>9.90</price> <xs:element name="quantity" type="xs:positiveInteger"/> </item> <xs:element name="price" type="xs:decimal"/></shiporder> </xs:sequence> XML </xs:complexType> </xs:element> © Twynstra Gudde 19-5-2010 Part of the XSD 9
  • 10. Service Oriented Architecture XML and XSD (XML Schema Definition) Example <?xml version="1.0" encoding="ISO-8859-1" ?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"><?xml version="1.0" encoding="ISO-8859-1"?> <xs:element name="shiporder"> <xs:complexType><shiporder orderid="889923" <xs:sequence>xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <xs:element name="orderperson" type="xs:string"/>xsi:noNamespaceSchemaLocation="shiporder.xsd"> <xs:element name="shipto"> <orderperson>John Smith</orderperson> <xs:complexType> <shipto> <xs:sequence> <name>Ola Nordmann</name> <xs:element name="name" type="xs:string"/> <address>Langgt 23</address> <xs:element name="address" type="xs:string"/> <city>4000 Stavanger</city> <xs:element name="city" type="xs:string"/> <country>Norway</country> <xs:element name="country" type="xs:string"/> </shipto> </xs:sequence> <item> </xs:complexType> <title>Empire Burlesque</title> </xs:element> <note>Special Edition</note> <xs:element name="item" maxOccurs="unbounded"> <quantity>1</quantity> <xs:complexType> <price>10.90</price> <xs:sequence> </item> <xs:element name="title" type="xs:string"/> <item> <xs:element name="note" type="xs:string" minOccurs="0"/> <title>Hide your heart</title> <xs:element name="quantity" type="xs:positiveInteger"/> <quantity>1</quantity> <xs:element name="price" type="xs:decimal"/> <price>9.90</price> </xs:sequence> </item> </xs:complexType></shiporder> </xs:element> Complete XML </xs:sequence> <xs:attribute name="orderid" type="xs:string" use="required"/> </xs:complexType> XSD Defines the </xs:element> structure of every XML </xs:schema> based on it Complete XSD © Twynstra Gudde 19-5-2010 10
  • 11. Service Oriented ArchitectureFundamental standards for web services (2)WSDL Visible service interface XML WSDL description request Service interface XML Service respons HTTP implementation Invisible, encapsulated internal implementation© Twynstra Gudde 19-5-2010 11
  • 12. Service Oriented ArchitectureWSDLWeb Service Definition Language– Web Service Definition Language <definitions>– Define the service interface for a <types> XSD definitions definition of types........ used web service </types> – Contains all the information needed to Possible call the web service <message> request and – Signature (name and paramaters): definition of a message.... response description of the request and response </message> messages messages – Protocal an location: where to find the <portType> Interfaces service, and how to access it definition of a port....... request/ </portType> response combinations <binding> definition of a binding.... How to call it </binding> </definitions>© Twynstra Gudde 19-5-2010 12
  • 13. Service Oriented Architecture WSDL example A simple Glossary <message name="getTermRequest"> Request message <part name="term" type="xs:string"/> </message> <message name="getTermResponse"> Response message <part name="value" type="xs:string"/> </message> <portType name="glossaryTerms"> Interface <operation name="getTerm"> When you send a <input message="getTermRequest"/> “getTermRequest” <output message="getTermResponse"/> you get a </operation>“getTermResponse” back </portType> <binding type="glossaryTerms" name="b1"> <soap:binding style="document" SOAP action transport="http://schemas.xmlsoap.org/soap/http" /> that corresponds <operation> to this action <soap:operation soapAction="http://example.com/getTerm"/> <input><soap:body use="literal"/></input> <output><soap:body use="literal"/></output> </operation> </binding> © Twynstra Gudde 19-5-2010 13
  • 14. Service Oriented ArchitectureFundamental standards for web services (3)SOAP Visible service interface XML WSDL description request SOAP Service interface XML Service respons HTTP implementation Invisible, encapsulated internal implementation© Twynstra Gudde 19-5-2010 14
  • 15. Service Oriented ArchitectureSOAPSimple Object Access Protocol– Simple Object Access Protocol <?xml version="1.0"?> – Call a component’s service by sending <soap:Envelope an XML-message xmlns:soap="http://www.w3.org/2001/12/soap- – Based on standard internet technology envelope" (HTTP) soap:encodingStyle="http://www.w3.org/2001/ 12/soap-encoding"> – Suitable for Business-to-Business communication: communication <soap:Header> between dissimilar systems (often ... outside your own company) </soap:Header> <soap:Body>– Requests and Responses can be ... sent and received as SOAP <soap:Fault> messages ... </soap:Fault> </soap:Body> </soap:Envelope>© Twynstra Gudde 19-5-2010 15
  • 16. Service Oriented Architecture A SOAP message van Header aan Beste / / BodyEnvelope © Twynstra Gudde 19-5-2010 16
  • 17. Service Oriented Architecture SOAP Example Request<?xml version="1.0"?><soap:Envelopexmlns: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> Response <?xml version="1.0"?></soap:Envelope> <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> © Twynstra Gudde 19-5-2010 </soap:Envelope> 17
  • 18. Service Oriented ArchitectureFundamental standards for web services (4)UDDI Visible service interface XML WSDL description request SOAP Service interface XML Service respons HTTP implementation Web Services Invisible, encapsulated internal implementation Rotterdam UDDI© Twynstra Gudde 19-5-2010 18
  • 19. Service Oriented ArchitectureWeb services XML message Described by a WSDL van an a Bes te / definition Inside a / SOAP message Sent over internet (HTTP HTTP) HTTP© Twynstra Gudde 19-5-2010 19
  • 20. Service Oriented ArchitectureWeb services protocols UDDI Supporting protocol WSDL SOAP Application XML protocol HTTP TCP Transport protocol IP© Twynstra Gudde 19-5-2010 20
  • 21. Service Oriented ArchitectureBas Kruiswijkbkr@tg.nlwww.twynstragudde.nlAll rights reserved. No part of this presentation may bereproduced or published in any form or by any meanswithout the prior written permission of Twynstra Gudde.© Twynstra Gudde 19-5-2010 21