Developing Web Services with the Eclipse Web Tools Platform
description
Transcript of Developing Web Services with the Eclipse Web Tools Platform
![Page 1: Developing Web Services with the Eclipse Web Tools Platform](https://reader035.fdocuments.us/reader035/viewer/2022070423/5681678b550346895ddca65e/html5/thumbnails/1.jpg)
Developing Web Services with the Eclipse Web Tools Platform
David Gallardo
![Page 2: Developing Web Services with the Eclipse Web Tools Platform](https://reader035.fdocuments.us/reader035/viewer/2022070423/5681678b550346895ddca65e/html5/thumbnails/2.jpg)
My books• Java Oracle Database Development• Eclipse in Action, (lead author)• Eclipse in Action, 2nd edition due out in December
• Preview article, Introducing the Eclipse Visual Editor available at: http://www.manning.com/books/gallardo2
![Page 3: Developing Web Services with the Eclipse Web Tools Platform](https://reader035.fdocuments.us/reader035/viewer/2022070423/5681678b550346895ddca65e/html5/thumbnails/3.jpg)
This presentation available at:
http://www.gallardo.org
![Page 4: Developing Web Services with the Eclipse Web Tools Platform](https://reader035.fdocuments.us/reader035/viewer/2022070423/5681678b550346895ddca65e/html5/thumbnails/4.jpg)
What are Web Services?
• Extend the WWW from “The Web for eyeballs” to “The Web for programs”
• Move from Business2User to Business2Business
• Language/platform neutral remote procedure calls built on HTTP infrastructure
![Page 5: Developing Web Services with the Eclipse Web Tools Platform](https://reader035.fdocuments.us/reader035/viewer/2022070423/5681678b550346895ddca65e/html5/thumbnails/5.jpg)
Locating a web service
![Page 6: Developing Web Services with the Eclipse Web Tools Platform](https://reader035.fdocuments.us/reader035/viewer/2022070423/5681678b550346895ddca65e/html5/thumbnails/6.jpg)
Locating a web service
Publish WSDL
![Page 7: Developing Web Services with the Eclipse Web Tools Platform](https://reader035.fdocuments.us/reader035/viewer/2022070423/5681678b550346895ddca65e/html5/thumbnails/7.jpg)
Locating a web service
Query for service
![Page 8: Developing Web Services with the Eclipse Web Tools Platform](https://reader035.fdocuments.us/reader035/viewer/2022070423/5681678b550346895ddca65e/html5/thumbnails/8.jpg)
Locating a web service
Obtain WSDL
![Page 9: Developing Web Services with the Eclipse Web Tools Platform](https://reader035.fdocuments.us/reader035/viewer/2022070423/5681678b550346895ddca65e/html5/thumbnails/9.jpg)
Using a web service
Call web service operation
![Page 10: Developing Web Services with the Eclipse Web Tools Platform](https://reader035.fdocuments.us/reader035/viewer/2022070423/5681678b550346895ddca65e/html5/thumbnails/10.jpg)
Using a web service
Receive result
![Page 11: Developing Web Services with the Eclipse Web Tools Platform](https://reader035.fdocuments.us/reader035/viewer/2022070423/5681678b550346895ddca65e/html5/thumbnails/11.jpg)
Web services alphabet soup
![Page 12: Developing Web Services with the Eclipse Web Tools Platform](https://reader035.fdocuments.us/reader035/viewer/2022070423/5681678b550346895ddca65e/html5/thumbnails/12.jpg)
Fundamental standards and technologies
• XML – eXtensible Markup Language: The syntax used for Web Service messages, configuration files, description files, etc.
• HTTP – Hypertext Transfer Protocol: The standard transport used to communicate between Web Service servers and clients
• RPC – Remote Procedure Call: The technique of executing a method call remotely—here, the client calling a web service’s operation.
![Page 13: Developing Web Services with the Eclipse Web Tools Platform](https://reader035.fdocuments.us/reader035/viewer/2022070423/5681678b550346895ddca65e/html5/thumbnails/13.jpg)
Web Service standards and technologies
• SOAP – Simple Object Access Protocol. An XML-based standard for sending messages (in a SOAP envelope) between web services and clients.
• WSDL—Web Service Definition Language XML-based description of a web services public interface. (Similar to CORBA IDL.)
• UDDI—Universal Description, Discovery and Integration. And XML-based registry for web service. Interrogated with SOAP messages, returns WSDL documents.
![Page 14: Developing Web Services with the Eclipse Web Tools Platform](https://reader035.fdocuments.us/reader035/viewer/2022070423/5681678b550346895ddca65e/html5/thumbnails/14.jpg)
Eclipse Web Services Platform
• Provides tools for:– Web applications using JSP/servlets– EJB– Web Service (based on Apache AXIS)– Database exploration
![Page 15: Developing Web Services with the Eclipse Web Tools Platform](https://reader035.fdocuments.us/reader035/viewer/2022070423/5681678b550346895ddca65e/html5/thumbnails/15.jpg)
Java Web Service related protocols
• JAXP—Java API for XML Processing• JAX-RPC—Java API for XML-based RPC• JAXR—Java API for XML registries• SAAJ—SOAP with Attachments API for
Java• SAX—Simple API for XML processing• DOM API—Document Object Model API
![Page 16: Developing Web Services with the Eclipse Web Tools Platform](https://reader035.fdocuments.us/reader035/viewer/2022070423/5681678b550346895ddca65e/html5/thumbnails/16.jpg)
The rest• We won’t worry about these for now:
DIME—Direct Internet Message EncapsulationHTTPR—Reliable HTTPWSCL—Web Services Conversation LanguageWSCM—Web Services Component ModelWSEL—Web Services Endpoint LanguageWSFL—Web Services Flow LanguageWSML—Web Services Meta LanguageWSXL-Web Services Experience LanguageWSUI—Web Services User InterfaceXLANG—Web Services for Business Process DesignUSML—UDDI Search Markup Language
![Page 17: Developing Web Services with the Eclipse Web Tools Platform](https://reader035.fdocuments.us/reader035/viewer/2022070423/5681678b550346895ddca65e/html5/thumbnails/17.jpg)
Eclipse WTP tools for developing a Web Service
• Top down:– You write the WSDL– Eclipse creates the necessary glue classes and
the service’s method stubs in a Java Bean– You implement the operations
• Bottom up:– You create the web service Java Bean– Eclipse creates the glue classes and the WSDL
![Page 18: Developing Web Services with the Eclipse Web Tools Platform](https://reader035.fdocuments.us/reader035/viewer/2022070423/5681678b550346895ddca65e/html5/thumbnails/18.jpg)
Demo
• Install WTP from Eclipse.org update site.• Create a web service, bottom-up• Exploring a Web Service using the Web Services
Explorer (ideally http://www.xmethods.com, but here we’ll just use the service we created.)
• Creating a web client for the GoogleAPI web service with WTP.
• Writing our own client.