arthur ryman ibm rational [email protected]

Download Arthur Ryman IBM Rational ryman@ca.ibm

If you can't read please download the document

Upload: quito

Post on 07-Jan-2016

21 views

Category:

Documents


0 download

DESCRIPTION

Developing Web Services with Eclipse. Arthur Ryman IBM Rational [email protected]. Abstract. - PowerPoint PPT Presentation

TRANSCRIPT

  • Arthur Ryman IBM Rational [email protected] Web Services with Eclipse

  • AbstractThe recently created Web Tools Platform Project extends Eclipse with a set of Open Source Web service development tools and APIs. This talk gives an overview of the project and focuses on its Web services support. The project is divided into two subprojects: Web Standard Tools and J2EE Standard Tools. The Web Standard Tools subproject contains support for XML Web Services, including tools based on standards defined by W3C, OASIS, WS-I and others. The J2EE Standard Tools subproject contains support for standards defined by JCP, such as JAX-RPC and JSR-109, and for reference implementations of these standards, such as Apache Axis. The project contains both a set of tools for Web service developers and a set of APIs for Web service tool creators. The talk includes a demonstration of the tools.This is an Introductory Level talk. It assumes some knowledge of Eclipse, Java, XML, and Web services.

  • My BackgroundSoftware Development Manager at IBM Toronto LabFocus on Web Service, XML, and J2EE ToolsRational Application Developer V6WebSphere Studio Application Developer V4, V5VisualAge for Java V1, V2, V3Leader of Web Standard Tools subproject, Eclipse Web Tools Platform projectEditor of W3C WSDL 2.0 Core Language specificationCommitter on Apache Woden Project

  • TopicsEclipse Web Tools Platform (WTP) ProjectWTP Web Service ToolsWeb Service Programming ExamplesCall for Participation

  • Eclipse Web Tools Platform Project

  • Eclipse Web Tools Platform ProjectSee: http://eclipse.org/webtoolsExtends the Eclipse Platform with tools and APIs for Web and J2EE application developmentFormally launched in June 2004Has two subprojects:Web Standard Tools (WST)J2EE Standard Tools (JST)Includes tools for HTML, XML, Web Services, J2EE, DataIncludes Server tools for integrating application servers, e.g. Tomcat, Geronimo, JBoss, WebSphere, WebLogic

  • WTP Subproject Scopes

  • WTP Architecture

  • WTP RoadmapWTP 0.7, July 2005 End User ToolsWTP 1.0, December 2005 Platform APIsWTP 1.5, June 2006 Java EE 5.0

  • IBM Software Development Platform and EclipseEclipse CoreGEFJDT/CDTTeam TPTPCM, Merge, Traceability.Model Services (UML2 ext, other Meta-Models, Code Gen APIs, )EMFUML2EclipseDeployment ManagerWeb Toolsothers

  • The IBM Software Development Platform

  • WTP Web Services Tools

  • Web Service Tools in WTP: WSTWeb Standard ToolsWeb Service ExplorerWSDL/XSD EditorWeb Service WizardWS-I Test Tools

  • Web Service Tools in WTP: JSTJ2EE Standard ToolsJ2EE ExplorerJAX-RPCJSR 109Axis 1.2.1

  • Web Services Explorer: Discovery and Publish Web ServicesDiscoverySearch UDDI RegistriesNavigate WSIL DocumentsImport WSDL into development projectTestDynamic invocation based on WSDLView SOAP messagesPublishPublish WSDL into UDDI Registries

  • Web Services Explorer DemoOpen Web Services Explorer Open XMethods UDDI RegistryFind all stock quote servicesSelect Stock Quote serviceOpen WSDL page and GetQuote for IBMImport WSDL into Workbench StockQuoteClient project as StockQuote.wsdl

  • WSDL/XSD Editor: Design Web ServicesGraphical and Source editing modesSeamless integration for editing inline XSDContent AssistPop-up actionsBinding WizardValidator, including WS-I profilesExtendible for WSDL extension elements

  • WSDL Editor DemoOpen StockQuote.wsdl in WSDL EditorGo into graphical view of XML schema for messagesNavigate into GetQuote elementSwitch to Source tabNavigate using linked Outline and Properties views

  • Web Services Wizard:Create and Access Web ServicesSupports generate/deploy/test/publish lifecycleConfigures project, server, and SOAP engineHighly extensibleSOAP enginesCode generatorsTest facilities

  • Web Services Wizard:Create and Access Web ServicesCode generationWSDL to client proxyWSDL to server skeletonJava to WSDLTest facilitiesJSP test clientWeb Service Explorer

  • Web Service Client Wizard DemoRun Web Service Client Wizard to generate Java proxy and JSP test page with TCP/IP monitorWizard adds Web application to Tomcat 5.0 server and installs Axis 1.2.1 SOAP engineSelect methods to include in JSP test pageTest getQuote() method using IBMView SOAP messages in TCP/IP monitor

  • WS-I Test Tools:Test Interoperability of Web ServicesDeveloped in Eclipse Web Service Validation Tools (WSVT) ProjectSupports WS-I Basic Profile 1.0/1.1, Simple SOAP Binding Profile 1.0, Attachments Profile 1.0WSDL 1.1 ValidatorSOAP 1.1 Message Monitor/Analyzer

  • WS-I SOAP Message Monitor/Analyzer

  • WS-I Test Tools DemoSpecify level of WS-I compliance in Preferences pageSave SOAP messages from TCP/IP to a WS-I log fileSpecify WSDL file that describes messagesView WS-I errors and warnings in Problems view

  • J2EE Web Services:Deploy Web ServicesWeb Services appear as first class objects in J2EE ExplorerContent assist for deployment descriptor source editorsJAX-RPC code generatorsJSR 109 supportAxis 1.2.1 adaptor

  • Web Service Programming Examples

  • Development ScenariosAccessing Web ServicesCreating Web ServicesBottom-UpTop-Down

  • Accessing Web ServicesThe preceding demo generated a JSP test client for the Stock Quote serviceWell now code a JSP client application that accesses itThe Web Service wizard generated JAX-RPC compliant client code and a convenience wrapperWell use this code in our client

  • JAX-RPC Client Code

  • JAX-RPC Client Codepackage NET.webserviceX.wwwtargetNamespace="http://www.webserviceX.NET/"StockQuoteLocator.java Service locatorStockQuote.java Service interface

    StockQuoteSoap.java Remote interface

    StockQuoteSoapStub.java Client stub wrapper for Call objectStockQuoteSoapProxy.java Client proxy convenience wrapper

  • Web Client Version 1: getQuote.jspCreate a JSPget a query parameter, symbol, create a service proxy, and invoke the getQuote operationSelect getQuote.jsp and invoke Run As->Run on ServerThe Web app is added to the server, the server is started, and a Web browser is opened on the appropriate URL for getQuote.jsp

  • Processing XMLThis service has a poorly designed interfaceXML is returned as an escaped stringNo schema for resultThe client needs to parse the result to extract the price, etc.Client application can parse XML using:DOM, SAX, Java data binding code (JAXB, etc.), or server-side XSLTFor fun, well use browser-side XSLT

  • Web Client Version 2: getQuote-xsl.jspView example of XML response ibm-quote.xmlCreate XSLT StockQuotes.xslGenerate to get symbolGenerate to present stock quoteCreate JSP getQuote-xsl.jspInsert processing instructionReturn unparsed XMLRun on Server to view result

  • Bottom-Up Web Service CreationAny reasonable Java class can be easily deployed as a Web serviceThis approach is very appealing to Java programmers since it lets them be immediately productiveThe WSDL is generated from the JavaThe result is acceptable if the methods use tame argument types, however object graphs are problematicTop-Down design is recommended to achieve the cleanest and most interoperable Web service interfaces

  • Bottom-Up Service: BUServiceCreate a new Web project: BUServiceCreate a data object to represent the result: BUStock.javaCreate a business object to take a symbol and return a stock quote for it: BUQuoter.javaUse the Web service wizard to deploy it. Use rpc-encoded style for fun so we can see WS-I errors. Generate and monitor a JSP test client.Test the service, view the messages in the monitor, and validate the SOAP messages for WS-I conformance. Note the errors caused by rpc-encoded style.

  • Top-Down Web Service CreationBusiness is transacted by exchanging documents purchase orders, receipts, application forms, insurance claims, building permits, etc.For best interoperability, treat Web services as document interchange, not distributed objectsModel documents using XSD, and operations using WSDLGenerate Java from WSDL

  • Top-Down Service: TDServiceCreate a new Web project: TDServiceCreate an XML schema for the Stock quote result: TDStock.xsdCreate a WSDL for the quote service with an operation that takes a symbol and returns a quote: TDQuoter.wsdl. Use the WSDL Binding wizard to generate document-literal SOAP binding style this time.Use the Web service wizard to generate the service.Fill in the implementation of the service: TDQuoterSOAPImpl.javaCreate a new Web project: TDServiceClientSelect /wsdl/TDQuoterSOAP.wsdl, create a JSP test client, and monitor the service. Test the service and validate the SOAP messages for WS-I conformance. There should be no errors this time.

  • SummaryThe Eclipse Web Tools project has a rich, extensible set of Web service toolsExplorer, Graphical WSDL and XSD editors, Wizard, WS-I Test ToolsDiscovery, explore, and access remote servicesCreate services from Java (bottom-up)Create services from WSDL and XSD (top-down)Check for WS-I conformance

  • Call for ParticipationBecome a WTP user and tell your friendsTest WTP and report bugsWrite tutorials, articlesFix bugsContribute enhancementsBecome a committerDevelop plug-ins based on WTPAttend EclipseCon 2006

    TPTP Test and Performance Tools Platform