Upload
daniella-fitzgerald
View
218
Download
0
Tags:
Embed Size (px)
Citation preview
Web Services Definition
"Web services are loosely coupled software components delivered over
Internet standard technologies ."
Daryl Plummer, GartnerJune 15, 2001
Web Services
• Next phase in the continuum– Next generation Web applications– Web-accessible XML-based services– Internet, Intranet, Extranet – B2B, B2C, P2P
• Evolutionary in terms of technology, revolutionary in terms of business impact
Web Services
• Application Services– email, scheduling, gift registry, buy a car,
stock quotes, credit card clearance, mortgage pre-qualification, billing, payroll, provisioning, logistics, procurement…
• System Services– storage, database, transactions, directory,
security, content management, messaging, streaming media, collaboration…
• May be provided by someone else … somewhere else
Web Services Characteristics
• Programmatic interface• Using standard Web protocols• Loosely-coupled connections
i.e., XML Messaging
Web ServicesThe Service Grid
Servicediscovery
Service invocation and delivery
ServiceRegistry
Service registration
ServiceDescriptions
Web Services (current state)The Service Grid
Servicediscovery
XML Messaging(SOAP/ebXML)
UDDIService registration
WSDL
Web ServicesEmerging Standards
SOAP/ ebXMLServiceA
ServiceB
WSDL
ServiceDescription
ServiceDescription
UDDI ebXMLBusinessRegistry
MetadataRegistry &Repository
XML Message
XML Messaging Systems
• SOAP V1.1• SOAP V1.2 (W3C XMLP)• SOAP with Attachments• ebXML Message Service
<?xml version=“1.0” encoding=“UTF-8”?> <SOAP-ENV:Envelope xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/>
<SOAP-ENV:Body SOAP-ENV:encodingStyle= “http://schemas.xmlsoap.org/soap/encoding/” xmlns:SOAP-ENC=“http://schemas.xmlsoap.org/soap/encoding/” xmlns:xsd=“http://www.w3.org/1999/XMLSchema” xmlns:xsi=“http://www.w3.org/1999/XMLSchema-instance” > <mywsdl:getQuote xmlns:mywsdl=“http://my.com/MyStockQuote.wsdl/”> <symbol>SUNW</symbol> </mywsdl:getQuote> </SOAP-ENV:Body></SOAP-ENV:Envelope>
SOAP Request Example
<?xml version=“1.0” encoding=“UTF-8”?> <SOAP-ENV:Envelope xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/> <SOAP-ENV:Body SOAP-ENV:encodingStyle= “http://schemas.xmlsoap.org/soap/encoding/” xmlns:SOAP-ENC=“http://schemas.xmlsoap.org/soap/encoding/” xmlns:xsd=“http://www.w3.org/1999/XMLSchema” xmlns:xsi=“http://www.w3.org/1999/XMLSchema-instance” > <mywsdl:ReturnLastTradePrice xmlns:mywsdl=“http://my.com/MyStockQuote.wsdl/”> <price>16.23</price> </mywsdl:ReturnLastTradePrice> </SOAP-ENV:Body></SOAP-ENV:Envelope>
SOAP Response Example
SOAP Implementations
• See http://www.soapware.org/– 19 Java implementations
• Examples:– Apache: SOAP– Idoox: WASP (plug-ins for Forte and
jBuilder)– The Mind Electric: GLUE– jBoss: ZOAP– Enhydra: kSOAP
<?xml version=“1.0” encoding=“UTF-8”?><definitions name=“myStockQuote" targetNamespace=“http://my.com/myStockQuote.wsdl” xmlns=“http://schemas.xmlsoap.org/wsdl/” xmlns:tns=“http://my.com/myStockQuote.wsdl” xmlns:xsd=“http://my.com/myStockQuote.xsd” xmlns:soap=“http://schemas.xmlsoap.org/wsdl/soap/”>
<types> <schema targetNamespace=“http://my.com/myStockQuote.xsd” xmlns=“http://www.w3.org/1999/XMLSchema”> <element name=“symbol” type=“string”/> <element name=“price” type=“double”/> </schema> </types>
WSDL Example
<message name=“GetLastTradePrice”> <part name=“request” element=“xsd:symbol”/></message>
<message name=“ReturnLastTradePrice”> <part name=“response” element=“xsd:price”/></message> <portType name=“MyStockQuotePortType"> <operation name=“getQuote"> <input message="tns:GetLastTradePrice"/> <output message="tns:ReturnLastTradePrice"/> </operation> </portType>
<binding name=“MyStockQuoteSoapRPCBinding" type="tns:MyStockQuotePortType"> <soap:binding style=“rpc” transport=“http://schemas.xmlsoap.org/soap/http”/>
<operation name=“getQuote"> <soap:operation soapAction=“http://my.com/getQuote”/> <input> <soap:body encodingStyle= “http://schemas.xmlsoap.org/soap/encoding/” namespace=“http://my.com/MyStockQuoteService” use=“encoded”/> </input> <output> <soap:body encodingStyle= “http://schemas.xmlsoap.org/soap/encoding/” namespace=“http://my.com/MyStockQuoteService” use=“encoded”/> </output> </operation></binding>
<service name=“MyStockQuoteService"> <documentation>My Stock Quote Service</documentation> <port name=“MyStockQuotePort" binding="tns:MyStockQuoteSoapRPCBinding"> <soap:address location=“http://my.com/myStockQuoteService”/> </port> </service></definitions>
UDDI Business Registry
Service TypeRegistrations
BusinessRegistrations
Marketplaces, search engines, and business apps query the registry to discover services at other companies
4.SW companies, standards bodies, and programmers populate the registry withdescriptions of different types of services
1.
3. Assigns a unique identifier to each service and business registration
Businesses populate the registry withdescriptions of the services they support
2.
Business uses this data to facilitate easier integration with each other over the Web
5.
ebXML BP Model
ebXML BO Library
ebXML BP Model
ebXML BO Library3
Build local system implementation
Request ebXML specifications1
ebXML specifications detail2
Query about Company X
6
Company X’s Profile
7
Submit CPA8
Accept CPA9
Request Company X’s S
cenario
10
Company X’s Scenario
11
Register scenarios and implementationRegister company business profile4
Confirm profile and scenarios5
DO BUSINESS!
12
INDUSTRY INPUT
Scenarios
Profiles
Specifications
Sun's Web Services StrategySun Open Net Environment (Sun ONE)
• Smart web services vision• Open architecture• Products• Third party/ASP efforts
ONE ArchitectureFreedom of Choice
• Platform for Web services– Future smart services
• Open, vendor-neutral• Industry standards• Guidelines and recommendations• Build your system your way
ONE Developer Model:Overview
InterfaceLogic
BusinessLogic
IntegrationLogic
Process XMLMessages
Implementthe Service
Access data,applications,and services
ONE Developer Model:Based on Proven Platform: J2EE
InterfaceLogic
BusinessLogic
IntegrationLogic
JSP &Servlets
Servletsand/or EJB
JDBC, JMS, JCA& Web services
JAX PackJava APIs for XML
• JAXP: Java API for XML Processing– (SAX, DOM, XSLT)
• JAXB: Java Architecture for XML Binding • JAXM: Java API for XML Messaging
– SOAP, ebXML (document style
• JAX/RPC: Java API for XML based RPC– SOAP (RPC style)
• JAXR: Java API for XML Registries – UDDI, ebXML reg/rep
• JWSDL: Java API for WSDL
Inside the Interface
XMLMessage
SOAPebXML
etc
Servlet
Receive XML MessageExtract PayloadDetermine ContentsDetermine ActionConvert XML to JavaInvoke Action Processor
JAXM or JAX/RPC(ebXML or SOAP)JAXP
JAXB or JAXPRMI
EJBs
Get resultsPersonalize dataConvert Java to XMLTransform XML to suit client requirementsPackage PayloadReturn XML Message
XMLMessage
RMI
JAXB or JAXPJAXP (XSLT)
JAXM or JAX/RPC(ebXML or SOAP)
JSR 109 – Enterprise Web Services
• Web Services Invocation Framework– Extends J2EE container model– See www.ibm.com/alphaworks
• Generate portable client stub from WSDL– Makes use of WSIF
• WSIF automates– Payload extraction– XML to object binding– Service invocation
Summary: ONE Architecture
• Guidelines for Web services– Create– Assemble– Deploy
• Based on Java, XML, and pervasive industry standards
• Fully interoperable with .Net • Sun ONE = Sun’s implementation
ONE = Freedom of Choice
• Open, vendor-neutral • Your business should drive your
technology decisions• Don’t let your technology drive
your business decisions
ONE versus .Net
ONE• Choice• Based on proven,
existing platform, available today
• Supports existing applications
• Supports integration with through standard XML
.Net• No choice• Based on new,
unproven platform, not available today
• Requires re-write of existing applications
• Customers are saying that BizTalk doesn’t interoperate
How Much is Vapour?
• You can build Web services today– Build with Java and XML
• Additional tools and services are in development by Sun and partners
– Tools: Forte, Cape Clear, Idoox, Tradia, IBM, The Mind Electric, Bind Systems,...
– Services: ebXML, UDDI, WSDL, SOAP, etc.
• Future (vision) = smart services – Depends on new standards