T320 E-business technologies: foundations and practice
Block 3 Part 2 Activity 2
Figure 2 Overview of remote access to 'Hello' service with Eclipse
It is, of course, equally possible for a WSDL document held in a local Eclipse project
to specify a remote EPR. Also, rather obviously, the WSDL description of a service
and the service itself may reside on a single remote server. The 'physical distribution'
aspect has no real impact on the mode of operation of the web service.
Static versus dynamic WSDL
The WSDL file that was generated when you created the 'Hello' web service was
produced by Axis software that is part of the WTP embedded in the T320 version of
Eclipse. This software examines the Java code implementing the web service as a
basis for determining the required input data, likely content returned, etc. and
subsequently creating the WSDL document.
There is also a server-side set of Axis software tools that have the same WSDL
generation capability. So if a web service is hosted on a remote server that is running
this Axis server-side software, the WSDL can be generated 'on demand' by Axis. (Of
course, you have no control over any of the options that you selected when generating
the 'Hello' web service – such as the encoding styl e, which will be investigated in
Part 6.) This dynamic approach to describing a service is not a general principle
behind web services, but it is useful to appreciate this possibility because it means we
don't have to actually deploy an independent WSDL.
There are various reasons that you might want to have a separate, static WSDL; for
example, so that you can tailor the options you require or so that you can have more
than one WSDL in different locations describing your service.
In the following sections I am going to show you how to use Eclipse to generate just a
simple client for your local 'Hello' web service if you wish, and how to do so for a
remotely hosted version of the same service. In this second case the web service in
question is running on top of the Axis server platform and has a WSDL document that
is generated by an HTTP request. For Eclipse when generating a client there is no
real difference between a local WSDL description, a remote static description or a
remote dynamically generated description.
OU demo services
At the OU there is a small set of toy web services. These can be accessed using a
client in the same way as you tested the 'Hello' web service using Eclipse. In fact, one
of the web services hosted is a copy of the 'Hello' service.