180 likes | 407 Views
Developing Web Services with the Eclipse Web Tools Platform. David Gallardo. My books. Java Oracle Database Development Eclipse in Action, (lead author) Eclipse in Action, 2 nd edition due out in December Preview article, Introducing the Eclipse Visual Editor available at:
E N D
Developing Web Services with the Eclipse Web Tools Platform David Gallardo
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
This presentation available at: http://www.gallardo.org
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
Locating a web service Publish WSDL
Locating a web service Query for service
Locating a web service Obtain WSDL
Using a web service Call web service operation
Using a web service Receive result
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.
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.
Eclipse Web Services Platform • Provides tools for: • Web applications using JSP/servlets • EJB • Web Service (based on Apache AXIS) • Database exploration
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
The rest • We won’t worry about these for now: DIME—Direct Internet Message Encapsulation HTTPR—Reliable HTTP WSCL—Web Services Conversation Language WSCM—Web Services Component Model WSEL—Web Services Endpoint Language WSFL—Web Services Flow Language WSML—Web Services Meta Language WSXL-Web Services Experience Language WSUI—Web Services User Interface XLANG—Web Services for Business Process Design USML—UDDI Search Markup Language
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
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.