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:
This presentation available at:
What are Web Services?
• Extend the WWW from “The Web for
eyeballs” to “The Web for programs”
• Move from Business2User to
• Language/platform neutral remote
procedure calls built on HTTP infrastructure
Locating a web service
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
Web services alphabet soup
Fundamental standards and
• 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
• SOAP – Simple Object Access Protocol. An
XML-based standard for sending messages (in a
SOAP envelope) between web services and
• WSDL—Web Service Definition Language XMLbased 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
Web Service (based on Apache AXIS)
Database exploration
Java Web Service related
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
• 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
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
• Install WTP from update site.
• Create a web service, bottom-up
• Exploring a Web Service using the Web Services
Explorer (ideally, 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.