Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Sun ONE Developer Model Anne Thomas Manes Director Market Innovation [email protected] Agenda • • • • Web Services Sun ONE Overview ONE Architecture ONE Developer Model Web Services Definition "Web services are loosely coupled software components delivered over Internet standard technologies ." Daryl Plummer, Gartner June 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 prequalification, 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 Services The Service Grid Service Registry Service discovery Service registration Service Descriptions Service invocation and delivery Web Services (current state) The Service Grid UDDI Service discovery Service registration WSDL XML Messaging (SOAP/ebXML) Web Services Emerging Standards XML Messaging Systems • • • • SOAP V1.1 SOAP V1.2 (W3C XMLP) SOAP with Attachments ebXML Message Service 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:getQuote xmlns:mywsdl=“http://my.com/MyStockQuote.wsdl/”> <symbol>SUNW</symbol> </mywsdl:getQuote> </SOAP-ENV:Body> </SOAP-ENV:Envelope> SOAP Response 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 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 WSDL • • • • • • Definitions Schema types Message formats Port types Bindings Service ports WSDL Example <?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> <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> 4. 1. SW companies, standards bodies, and programmers populate the registry with descriptions of different types of services 2. Businesses populate the registry with descriptions of the services they support Marketplaces, search engines, and business apps query the registry to discover services at other companies UDDI Business Registry Business Registrations 3. Service Type Registrations Assigns a unique identifier to each service and business registration 5. Business uses this data to facilitate easier integration with each other over the Web Request ebXML specifications 1 ebXML specifications detail 2 Register scenarios and implementation 4 Register company business profile ebXML BO Library 3 ebXML BP Model 12 DO BUSINESS! Confirm profile and scenarios Specifications Build local system implementation 9 5 7 Accept CPA 8 Submit CPA Profiles Scenarios 6 11 10 ebXML BO Library ebXML BP Model INDUSTRY INPUT Sun's Web Services Strategy Sun Open Net Environment (Sun ONE) • • • • Smart web services vision Open architecture Products Third party/ASP efforts ONE Architecture Freedom of Choice • Platform for Web services – Future smart services • • • • Open, vendor-neutral Industry standards Guidelines and recommendations Build your system your way ONE Architecture Product Agnostic ONE Architecture Standards Backplane Sun ONE Integratable Stack Our Product Implementations Integratable Stack Build it Your Way ONE Developer Model: Overview Interface Logic Business Logic Integration Logic Process XML Messages Implement the Service Access data, applications, and services ONE Developer Model: Based on Proven Platform: J2EE Interface Logic JSP & Servlets Business Logic Integration Logic Servlets JDBC, JMS, JCA and/or EJB & Web services ONE Developer Model Anatomy of a Web Service JAX Pack Java 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 Servlet XML Message SOAP ebXML etc XML Message Receive XML Message Extract Payload Determine Contents Determine Action Convert XML to Java Invoke Action Processor JAXM or JAX/RPC (ebXML or SOAP) JAXP Get results Personalize data Convert Java to XML Transform XML to suit client requirements Package Payload Return XML Message RMI JAXB or JAXP RMI EJBs JAXB or JAXP JAXP (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 .Net • Choice • Based on proven, existing platform, available today • Supports existing applications • Supports integration with through standard XML • No choice • Based on new, unproven platform, not available today • Requires re-write of existing applications • Customers are saying that BizTalk doesn’t 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