Eclipse Web Tools Platform Project © 2005 IBM Corporation Developing Web Services with Eclipse – Programming Examples Arthur Ryman IBM Rational

Slides:



Advertisements
Similar presentations
You have been given a mission and a code. Use the code to complete the mission and you will save the world from obliteration…
Advertisements

Advanced Piloting Cruise Plot.
Feichter_DPG-SYKL03_Bild-01. Feichter_DPG-SYKL03_Bild-02.
© 2008 Pearson Addison Wesley. All rights reserved Chapter Seven Costs.
Copyright © 2003 Pearson Education, Inc. Slide 1 Computer Systems Organization & Architecture Chapters 8-12 John D. Carpinelli.
Chapter 1 The Study of Body Function Image PowerPoint
Author: Julia Richards and R. Scott Hawley
1 Copyright © 2013 Elsevier Inc. All rights reserved. Appendix 01.
UNITED NATIONS Shipment Details Report – January 2006.
Business Transaction Management Software for Application Coordination 1 Business Processes and Coordination.
19 Copyright © 2005, Oracle. All rights reserved. Distributing Modular Applications: Developing Web Services.
18 Copyright © 2005, Oracle. All rights reserved. Distributing Modular Applications: Introduction to Web Services.
4 Copyright © 2005, Oracle. All rights reserved. Creating the Web Tier: Servlets.
11 Copyright © 2005, Oracle. All rights reserved. Creating the Business Tier: Enterprise JavaBeans.
1 RA I Sub-Regional Training Seminar on CLIMAT&CLIMAT TEMP Reporting Casablanca, Morocco, 20 – 22 December 2005 Status of observing programmes in RA I.
Jeopardy Q 1 Q 6 Q 11 Q 16 Q 21 Q 2 Q 7 Q 12 Q 17 Q 22 Q 3 Q 8 Q 13
Jeopardy Q 1 Q 6 Q 11 Q 16 Q 21 Q 2 Q 7 Q 12 Q 17 Q 22 Q 3 Q 8 Q 13
Title Subtitle.
My Alphabet Book abcdefghijklm nopqrstuvwxyz.
FACTORING ax2 + bx + c Think “unfoil” Work down, Show all steps.
Addition Facts
Year 6 mental test 10 second questions
2010 fotografiert von Jürgen Roßberg © Fr 1 Sa 2 So 3 Mo 4 Di 5 Mi 6 Do 7 Fr 8 Sa 9 So 10 Mo 11 Di 12 Mi 13 Do 14 Fr 15 Sa 16 So 17 Mo 18 Di 19.
ZMQS ZMQS
CIS* Service-Oriented Computing
Server Access The REST of the Story David Cleary
Written by Liron Blecher
REVIEW: Arthropod ID. 1. Name the subphylum. 2. Name the subphylum. 3. Name the order.
ABC Technology Project
EU market situation for eggs and poultry Management Committee 20 October 2011.
Copyright 2007, Information Builders. Slide 1 Introduction to Web Services Efrem Litwin Director, WebFOCUS Integration Products Information Builders.
1 Undirected Breadth First Search F A BCG DE H 2 F A BCG DE H Queue: A get Undiscovered Fringe Finished Active 0 distance from A visit(A)
2 |SharePoint Saturday New York City
VOORBLAD.
15. Oktober Oktober Oktober 2012.
1 Breadth First Search s s Undiscovered Discovered Finished Queue: s Top of queue 2 1 Shortest path from s.
BIOLOGY AUGUST 2013 OPENING ASSIGNMENTS. AUGUST 7, 2013  Question goes here!
Factor P 16 8(8-5ab) 4(d² + 4) 3rs(2r – s) 15cd(1 + 2cd) 8(4a² + 3b²)
Basel-ICU-Journal Challenge18/20/ Basel-ICU-Journal Challenge8/20/2014.
1..
31242/32549 Advanced Internet Programming Advanced Java Programming
© 2012 National Heart Foundation of Australia. Slide 2.
Lets play bingo!!. Calculate: MEAN Calculate: MEDIAN
Understanding Generalist Practice, 5e, Kirst-Ashman/Hull
Addition 1’s to 20.
25 seconds left…...
Presentation 7 part 2: SOAP & WSDL.
H to shape fully developed personality to shape fully developed personality for successful application in life for successful.
Januar MDMDFSSMDMDFSSS
Week 1.
Analyzing Genes and Genomes
We will resume in: 25 Minutes.
©Brooks/Cole, 2001 Chapter 12 Derived Types-- Enumerated, Structure and Union.
12 January 2009SDS batch generation, distribution and web interface 1 ExESS IT tool for SDS batch generation, distribution and web interface ExESS IT tool.
Intracellular Compartments and Transport
PSSA Preparation.
VPN AND REMOTE ACCESS Mohammad S. Hasan 1 VPN and Remote Access.
Immunobiology: The Immune System in Health & Disease Sixth Edition
Essential Cell Biology
Immunobiology: The Immune System in Health & Disease Sixth Edition
Introduction Peter Dolog dolog [at] cs [dot] aau [dot] dk Intelligent Web and Information Systems September 9, 2010.
1 XML Web Services Practical Implementations Bob Steemson Product Architect iSOFT plc.
Arthur Ryman IBM Rational Developing Web Services with Eclipse.
WEB SERVICES.
Presentation transcript:

Eclipse Web Tools Platform Project © 2005 IBM Corporation Developing Web Services with Eclipse – Programming Examples Arthur Ryman IBM Rational EclipseWorld New York,

Eclipse Web Tools Platform Project © 2005 IBM Corporation 2Developing Web Services with Eclipse, EclipseWorld, New York Development Scenarios  Accessing Web Services  Creating Web Services –Bottom-Up –Top-Down

Eclipse Web Tools Platform Project © 2005 IBM Corporation 3Developing Web Services with Eclipse, EclipseWorld, New York Accessing Web Services  The preceding demo generated a JSP test client for the Stock Quote service  We’ll now code a JSP client application that accesses it  The Web Service wizard generated JAX-RPC compliant client code and a convenience wrapper  We’ll use this code in our client

Eclipse Web Tools Platform Project © 2005 IBM Corporation 4Developing Web Services with Eclipse, EclipseWorld, New York JAX-RPC Client Code

Eclipse Web Tools Platform Project © 2005 IBM Corporation 5Developing Web Services with Eclipse, EclipseWorld, New York JAX-RPC Client Code  package NET.webserviceX.www –targetNamespace="  StockQuoteLocator.java – Service locator StockQuoteLocator.java  StockQuote.java – Service interface StockQuote.java –  StockQuoteSoap.java – Remote interface StockQuoteSoap.java –  StockQuoteSoapStub.java – Client stub wrapper for Call object StockQuoteSoapStub.java  StockQuoteSoapProxy.java – Client proxy convenience wrapper StockQuoteSoapProxy.java

Eclipse Web Tools Platform Project © 2005 IBM Corporation 6Developing Web Services with Eclipse, EclipseWorld, New York Web Client Version 1: getQuote.jspgetQuote.jsp 1)Create a JSP 1)get a query parameter, “symbol”, 2)create a service proxy, and 3)invoke the “getQuote” operation 2)Select getQuote.jsp and invoke Run As->Run on ServergetQuote.jsp 1)The Web app is added to the server, 2)the server is started, and 3)a Web browser is opened on the appropriate URL for getQuote.jsp getQuote.jsp

Eclipse Web Tools Platform Project © 2005 IBM Corporation 7Developing Web Services with Eclipse, EclipseWorld, New York

Eclipse Web Tools Platform Project © 2005 IBM Corporation 8Developing Web Services with Eclipse, EclipseWorld, New York

Eclipse Web Tools Platform Project © 2005 IBM Corporation 9Developing Web Services with Eclipse, EclipseWorld, New York Processing XML  This service has a poorly designed interface –XML is returned as an escaped string –No schema for result  The 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 XSLT  For fun, we’ll use browser-side XSLT

Eclipse Web Tools Platform Project © 2005 IBM Corporation 10Developing Web Services with Eclipse, EclipseWorld, New York Web Client Version 2: getQuote-xsl.jspgetQuote-xsl.jsp 1)View example of XML response ibm-quote.xmlibm-quote.xml 2)Create XSLT StockQuotes.xslStockQuotes.xsl 1)Generate to get symbol 2)Generate to present stock quote 3)Create JSP getQuote-xsl.jspgetQuote-xsl.jsp 1)Insert processing instruction 2)Return unparsed XML 4)Run on Server to view result

Eclipse Web Tools Platform Project © 2005 IBM Corporation 11Developing Web Services with Eclipse, EclipseWorld, New York

Eclipse Web Tools Platform Project © 2005 IBM Corporation 12Developing Web Services with Eclipse, EclipseWorld, New York

Eclipse Web Tools Platform Project © 2005 IBM Corporation 13Developing Web Services with Eclipse, EclipseWorld, New York

Eclipse Web Tools Platform Project © 2005 IBM Corporation 14Developing Web Services with Eclipse, EclipseWorld, New York

Eclipse Web Tools Platform Project © 2005 IBM Corporation 15Developing Web Services with Eclipse, EclipseWorld, New York Bottom-Up Web Service Creation  Any “reasonable” Java class can be easily deployed as a Web service  This approach is very appealing to Java programmers since it lets them be immediately productive  The WSDL is generated from the Java  The result is acceptable if the methods use “tame” argument types, however object graphs are problematic  Top-Down design is recommended to achieve the cleanest and most interoperable Web service interfaces

Eclipse Web Tools Platform Project © 2005 IBM Corporation 16Developing Web Services with Eclipse, EclipseWorld, New York Bottom-Up Service: BUService 1)Create a new Web project: BUService 2)Create a data object to represent the result: BUStock.javaBUStock.java 3)Create a business object to take a symbol and return a stock quote for it: BUQuoter.javaBUQuoter.java 4)Use 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. 5)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.

Eclipse Web Tools Platform Project © 2005 IBM Corporation 17Developing Web Services with Eclipse, EclipseWorld, New York

Eclipse Web Tools Platform Project © 2005 IBM Corporation 18Developing Web Services with Eclipse, EclipseWorld, New York

Eclipse Web Tools Platform Project © 2005 IBM Corporation 19Developing Web Services with Eclipse, EclipseWorld, New York

Eclipse Web Tools Platform Project © 2005 IBM Corporation 20Developing Web Services with Eclipse, EclipseWorld, New York

Eclipse Web Tools Platform Project © 2005 IBM Corporation 21Developing Web Services with Eclipse, EclipseWorld, New York

Eclipse Web Tools Platform Project © 2005 IBM Corporation 22Developing Web Services with Eclipse, EclipseWorld, New York

Eclipse Web Tools Platform Project © 2005 IBM Corporation 23Developing Web Services with Eclipse, EclipseWorld, New York Top-Down Web Service Creation  Business 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 objects  Model documents using XSD, and operations using WSDL  Generate Java from WSDL

Eclipse Web Tools Platform Project © 2005 IBM Corporation 24Developing Web Services with Eclipse, EclipseWorld, New York Top-Down Service: TDService 1)Create a new Web project: TDService 2)Create an XML schema for the Stock quote result: TDStock.xsdTDStock.xsd 3)Create 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.TDQuoter.wsdl 4)Use the Web service wizard to generate the service. 5)Fill in the implementation of the service: TDQuoterSOAPImpl.javaTDQuoterSOAPImpl.java 6)Create a new Web project: TDServiceClient 7)Select /wsdl/TDQuoterSOAP.wsdl, create a JSP test client, and monitor the service. 8)Test the service and validate the SOAP messages for WS-I conformance. There should be no errors this time.

Eclipse Web Tools Platform Project © 2005 IBM Corporation 25Developing Web Services with Eclipse, EclipseWorld, New York

Eclipse Web Tools Platform Project © 2005 IBM Corporation 26Developing Web Services with Eclipse, EclipseWorld, New York

Eclipse Web Tools Platform Project © 2005 IBM Corporation 27Developing Web Services with Eclipse, EclipseWorld, New York

Eclipse Web Tools Platform Project © 2005 IBM Corporation 28Developing Web Services with Eclipse, EclipseWorld, New York

Eclipse Web Tools Platform Project © 2005 IBM Corporation 29Developing Web Services with Eclipse, EclipseWorld, New York

Eclipse Web Tools Platform Project © 2005 IBM Corporation 30Developing Web Services with Eclipse, EclipseWorld, New York

Eclipse Web Tools Platform Project © 2005 IBM Corporation 31Developing Web Services with Eclipse, EclipseWorld, New York