SlideShare a Scribd company logo
1 of 12
Download to read offline
T320 E-business technologies:
foundations and practice
Block 3 Part 2 Activity 2: Generating a
client from WSDL
Prepared for the course team by Neil Simpkins
Introduction

1

WSDL for client access

2

Static versus dynamic WSDL

3

OU demo services

3

Creating a dynamic web project

4

Adding a simple client

6

More clients

12

Introduction
In this activity I shall illustrate how you can quickly and easily generate a client so that
you can access a web service.
You have in fact already completed this exercise, at least in the main part, when you
created the 'Hello' web service and generated a client to test that web service at the
same time. However, here there will be a couple of slight differences. Firstly, you will
not be producing a web service and a client, just a client for a web service. Secondly,
you will explicitly use a WSDL description of the web service on which to base the
client. This was also the case 'behind the scenes' when you deployed and tested the
'Hello' service.
The client will be generated within Eclipse, which uses the WSDL description of a
service to determine how a request to the service should be formulated and what
response is expected. The client itself takes the form of a simple set of web pages,
just as before when you tested the 'Hello' web service.
It's important to recognise that the WSDL document that Eclipse uses to generate the
client might be located in an Eclipse project locally on your machine, or it might be
hosted on a machine somewhere on the Internet.
Copyright © 2008 The Open University.
This document is made available under the Creative Commons Attribution - No Derivative

Works 3.0 Unported Licence (http://creativecommons.org/licenses/by-nd/3.0/)

WEB 00711 3

1.1
T320 E-business technologies: foundations and practice

WSDL for client access
A WSDL service description provides all the information that is required to use a web
service. The T320 version of Eclipse incorporates the Web Tools Platform (WTP),
which provides support for generating a client based on the information inside a
WSDL.
The WSDL that describes a service includes a range of crucial information, such as
the required content of a request and also the location of the web service. This
location, called the endpoint reference (EPR), is included in the service description.
The endpoint reference is thus a key item in the service description. If we move the
web service then the EPR in all descriptions of the web service needs to be changed.
In Figure 1 I have depicted the realisation of the 'Hello' web service after completing
the practical activity you carried out in Part 1. The WSDL is held locally in your
workspace and will have a local EPR for the web service implementation, such as
http://localhost:8080/Hello/services/Hello.

Eclipse
WTP

3
response

1
parse description
and generate client

Eclipse
project
WSDL
EPR = http://localhost/
services/HelloService

2
request

service deployed
and running on local HelloService
Tomcat by WTP
Eclipse IDE
Figure 1

Overview of local access to 'Hello' service with Eclipse

When you used Eclipse to deploy the web service and generate a client, it performed
a lot of work behind the scenes. It first deployed the web service to the server, started
the service running and set up a proxy so that it could pass requests to the service
and receive any response. Then it generated the WSDL description of the service and
put this into the 'WebContent/wsdl' directory of the project.
To generate the client web pages, Eclipse parses the WSDL document. Based on
that, it can determine the input requirements for the web service that are used to
create the 'Inputs' form etc. The WSDL also tells Eclipse to send requests to the local
Tomcat server. This configuration is illustrated by the Eclipse WTP, project and local
service depicted in Figure 1; this is, of course, exactly the setup you employed in
completing the Part 1 practical activity.
If the web service is deployed to a remote server then Eclipse has to be given the
location and will download the WSDL for processing; in this respect the two scenarios
are not much different. The web service itself can also be situated on a remote server,
as specified by the EPR in the service WSDL. This configuration is illustrated in
Figure 2.

Block 3 Part 2 Activity 2

| 2
T320 E-business technologies: foundations and practice

1
download,
parse description
and generate client

some server
on Internet
WSDL

Eclipse
IDE

EPR = http://somewhere.com/
services/HelloService
2
request

service running on
somewhere.com server

3
response
HelloService

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 style, 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.

Block 3 Part 2 Activity 2

| 3
T320 E-business technologies: foundations and practice

Here you will use a copy of the 'Hello' web service that is hosted at the OU as the
service to be accessed by the client. You can just as easily access other services on
the Internet or your local implementation of the 'Hello' service in the same way.
When you go to this location, if you do not already have a log-in session running then
you will be redirected to a log-in page and asked to log in to the University network.
Log in with the same username (OUCU) and password that you use to access the
T320 course web site.

Creating a dynamic web project
Start your Block 3 Eclipse and make sure you have a Tomcat server configured for
use (see the guide Configuring an Application Server in Eclipse if you are unsure how
to do this). Then create a new dynamic project using File > New > Project…
(Figure 3).

Figure 3

Selecting a new project

Then, in the New Project dialogue box, expand the 'Web' option and select 'Dynamic
Web Project' (Figure 4) before clicking the 'Next' button.
Then give your project a name, such as 'HelloServiceClient', and click 'Finish'
(Figure 5).

Block 3 Part 2 Activity 2

| 4
T320 E-business technologies: foundations and practice

Figure 4

Dynamic web project selection

Figure 5

Naming the new project
Block 3 Part 2 Activity 2

| 5
T320 E-business technologies: foundations and practice

As Eclipse builds the new project, you will most likely be asked if you wish to open the
project in the Java EE perspective (Figure 6). You should click on 'Yes' when this is
offered.

Figure 6

Dialogue option to open Java EE perspective

After a time, the newly created project will be displayed in Eclipse (Figure 7).

Figure 7

Newly created project in the Project Explorer

Adding a simple client
Next you need to add a web service client to the project. To do this, select the project
in the Project Explorer and right-click on it. Then select New > Other… as shown in
Figure 8.
You should then be presented with the dialogue box shown in Figure 9; here, you
should open the 'Web Services' folder and select the 'Web Service Client' option
before clicking on the 'Next' button.

Block 3 Part 2 Activity 2

| 6
T320 E-business technologies: foundations and practice

Figure 8

Selecting New > Other… to add a client to the project

Figure 9

Selecting a wizard to generate a web service client

Block 3 Part 2 Activity 2

| 7
T320 E-business technologies: foundations and practice

You will then be presented with the dialogue box shown in Figure 10. You may well
recognise this as including much of the lower section of the dialogue box shown in
Figure 16 of the Implementing a simple web service activity that you completed in
Part 1 of the block. There are a few differences, the most significant being that here
there is a need to specify a 'Service definition'.

Figure 10 Initial client configuration dialogue
Click on the 'Browse' button at the top of the box. This will take you to the dialogue
box shown in Figure 11. Here the topmost text box has the label 'Enter a URI to a
1
WSDL, WSIL or HTML document'. A URI can be entered, which might be the location
of a file on your machine or, for example, an HTTP URL. So there is the flexibility to
use a WSDL document that resides on your machine or one that can be acquired from
the Internet over HTTP (or FTP etc.).
When you created the 'Hello' web service, there was at this stage a slightly different
text box to complete that requested a 'service implementation'. This you filled with the
name of the Java class that implemented the web service logic. Eclipse (and the WTP)
then used that code to create the WSDL, which it placed inside your project and then
used to generate the client. If you have the 'Hello' project handy (and deployed to your
local Tomcat server) then you could point this new client at that local 'Hello' web service.

1

Web Services Inspection Language (WSIL), a joint effort by Microsoft and IBM, is a different approach to
describing web services; see, for example,
http://www.ibm.com/developerworks/library/specification/ws-wsilspec/.
The chief difference between WSDL and WSIL appears to be that WSIL lists groups of web services and
their endpoints in an XML format rather than describing a single service.

Block 3 Part 2 Activity 2

| 8
T320 E-business technologies: foundations and practice

Instead of that, here I am going to create a client that uses a remote implementation of
the 'Hello' web service over the Internet.

Figure 11 Select Service Implementation dialogue box
I shall look at the sample web service hosted at the University at the end of this
booklet. For now, you should note that the URL for the EPR of the 'Hello' web service
at the OU is:
http://t320webservices.open.ac.uk/t320/services/HelloService
Axis will generate the WSDL document describing a web service if we postfix the EPR
with a parameter 'wsdl'. So using a '?' to append this to the URL, we can acquire the
WSDL for the 'Hello' service using:
http://t320webservices.open.ac.uk/t320/services/HelloService?wsdl
You can view the WSDL document by copying this URL into a web browser
(Figure 12).
Now enter the URL for the WSDL in the Eclipse Select Service Implementation
dialogue box. When you have done this, you should see the URL listed in the list of
WSDLs under the text 'Select a WSDL' (Figure 13).

Block 3 Part 2 Activity 2

| 9
T320 E-business technologies: foundations and practice

Figure 12 Hello service WSDL listed in a web browser

Figure 13 'Hello' service WSDL listed in dialogue box

Block 3 Part 2 Activity 2

| 10
T320 E-business technologies: foundations and practice

At this point it is possible that you will receive a message in a pop-up dialogue box
telling you that the WSDL cannot be retrieved. This generally means that the web
service is not available. If this is the case, you should raise the matter in the course
forums so that the services can be fixed by University staff.
If the WSDL is listed then click on the 'OK' button. This will take you back to the client
configuration dialogue box (Figure 10).
Next raise the slider on the left of the dialogue box so that 'Test client' is displayed (i.e.
you want to create a test client), and tick the 'Monitor the Web service' box if you wish
to observe messages sent to and received from the web service (Figure 14). Then
click the 'Finish' button.

Figure 14 Completed client configuration dialogue box
After a time, the client will be generated and you will see that the now familiar web
pages of the client are shown in Eclipse (Figure 15).
As before, you can use the web service by first clicking on the 'HelloName' method in
the Methods panel, then entering a name in the text box that appears in the Inputs
panel, and finally clicking the 'Invoke' button (Figure 16).
Everything in the client appears as it was when you created and tested the 'Hello' web
service locally in Part 1. Of course, there is a real difference behind the scenes. The
SOAP request to the web service is being sent across the Internet to the OU server
't320webservices.open.ac.uk', and the response is being sent back in the same way
from the remote machine.

Block 3 Part 2 Activity 2

| 11
T320 E-business technologies: foundations and practice

Figure 15 Initial client web pages in Eclipse

Figure 16 Client after invoking the 'Hello' service

More clients
You will find the 'Hello' service and others listed on the OU T320 Axis site at:
http://t320webservices.open.ac.uk/t320/services/listServices
You will find that you can access any of these services using the associated WSDL
document that is generated by appending '?wsdl' to the EPR for the service.
Try out at least one other service to see how this works.

Block 3 Part 2 Activity 2

| 12

More Related Content

What's hot

Welcome to React & Flux !
Welcome to React & Flux !Welcome to React & Flux !
Welcome to React & Flux !Ritesh Kumar
 
Introduction to ASP.NET MVC
Introduction to ASP.NET MVCIntroduction to ASP.NET MVC
Introduction to ASP.NET MVCLearnNowOnline
 
Introduction to React for Frontend Developers
Introduction to React for Frontend DevelopersIntroduction to React for Frontend Developers
Introduction to React for Frontend DevelopersSergio Nakamura
 
Design Patterns in ZK: Java MVVM as Model-View-Binder
Design Patterns in ZK: Java MVVM as Model-View-BinderDesign Patterns in ZK: Java MVVM as Model-View-Binder
Design Patterns in ZK: Java MVVM as Model-View-BinderSimon Massey
 
Esri Dev Summit 2009 Rest and Mvc Final
Esri Dev Summit 2009 Rest and Mvc FinalEsri Dev Summit 2009 Rest and Mvc Final
Esri Dev Summit 2009 Rest and Mvc Finalguestcd4688
 
Build a video chat application with twilio, rails, and javascript (part 1)
Build a video chat application with twilio, rails, and javascript (part 1)Build a video chat application with twilio, rails, and javascript (part 1)
Build a video chat application with twilio, rails, and javascript (part 1)Katy Slemon
 
Custom connector development using mule DevKit
Custom connector development using mule DevKitCustom connector development using mule DevKit
Custom connector development using mule DevKitRamakrishna Narkedamilli
 
ASP.NET MVC Performance
ASP.NET MVC PerformanceASP.NET MVC Performance
ASP.NET MVC Performancerudib
 
MVC Puree - Approaches to MVC with Umbraco
MVC Puree - Approaches to MVC with UmbracoMVC Puree - Approaches to MVC with Umbraco
MVC Puree - Approaches to MVC with UmbracoAndy Butland
 
Active object of Symbian in the lights of client server architecture
Active object of Symbian in the lights of client server architectureActive object of Symbian in the lights of client server architecture
Active object of Symbian in the lights of client server architectureSomenath Mukhopadhyay
 
]project-open[ Workflow Developer Tutorial Part 2
]project-open[ Workflow Developer Tutorial Part 2]project-open[ Workflow Developer Tutorial Part 2
]project-open[ Workflow Developer Tutorial Part 2Klaus Hofeditz
 
React - An Introduction
React - An IntroductionReact - An Introduction
React - An IntroductionTyler Johnston
 
How to develop a gateway service using code based implementation
How to develop a gateway service using code based implementationHow to develop a gateway service using code based implementation
How to develop a gateway service using code based implementationnitin2517
 
Enterprise Level Application Architecture with Web APIs using Entity Framewor...
Enterprise Level Application Architecture with Web APIs using Entity Framewor...Enterprise Level Application Architecture with Web APIs using Entity Framewor...
Enterprise Level Application Architecture with Web APIs using Entity Framewor...Akhil Mittal
 
Meteor.js Workshop by Dopravo
Meteor.js Workshop by DopravoMeteor.js Workshop by Dopravo
Meteor.js Workshop by DopravoArabNet ME
 
Toms introtospring mvc
Toms introtospring mvcToms introtospring mvc
Toms introtospring mvcGuo Albert
 
Servlet ppt by vikas jagtap
Servlet ppt by vikas jagtapServlet ppt by vikas jagtap
Servlet ppt by vikas jagtapVikas Jagtap
 

What's hot (20)

Welcome to React & Flux !
Welcome to React & Flux !Welcome to React & Flux !
Welcome to React & Flux !
 
Introduction to ASP.NET MVC
Introduction to ASP.NET MVCIntroduction to ASP.NET MVC
Introduction to ASP.NET MVC
 
Les24
Les24Les24
Les24
 
Introduction to React for Frontend Developers
Introduction to React for Frontend DevelopersIntroduction to React for Frontend Developers
Introduction to React for Frontend Developers
 
MVC Training Part 2
MVC Training Part 2MVC Training Part 2
MVC Training Part 2
 
Design Patterns in ZK: Java MVVM as Model-View-Binder
Design Patterns in ZK: Java MVVM as Model-View-BinderDesign Patterns in ZK: Java MVVM as Model-View-Binder
Design Patterns in ZK: Java MVVM as Model-View-Binder
 
Esri Dev Summit 2009 Rest and Mvc Final
Esri Dev Summit 2009 Rest and Mvc FinalEsri Dev Summit 2009 Rest and Mvc Final
Esri Dev Summit 2009 Rest and Mvc Final
 
Build a video chat application with twilio, rails, and javascript (part 1)
Build a video chat application with twilio, rails, and javascript (part 1)Build a video chat application with twilio, rails, and javascript (part 1)
Build a video chat application with twilio, rails, and javascript (part 1)
 
Custom connector development using mule DevKit
Custom connector development using mule DevKitCustom connector development using mule DevKit
Custom connector development using mule DevKit
 
ASP.NET MVC Performance
ASP.NET MVC PerformanceASP.NET MVC Performance
ASP.NET MVC Performance
 
MVC Puree - Approaches to MVC with Umbraco
MVC Puree - Approaches to MVC with UmbracoMVC Puree - Approaches to MVC with Umbraco
MVC Puree - Approaches to MVC with Umbraco
 
Active object of Symbian in the lights of client server architecture
Active object of Symbian in the lights of client server architectureActive object of Symbian in the lights of client server architecture
Active object of Symbian in the lights of client server architecture
 
]project-open[ Workflow Developer Tutorial Part 2
]project-open[ Workflow Developer Tutorial Part 2]project-open[ Workflow Developer Tutorial Part 2
]project-open[ Workflow Developer Tutorial Part 2
 
React - An Introduction
React - An IntroductionReact - An Introduction
React - An Introduction
 
How to develop a gateway service using code based implementation
How to develop a gateway service using code based implementationHow to develop a gateway service using code based implementation
How to develop a gateway service using code based implementation
 
Android how to hellowidget
Android how to hellowidgetAndroid how to hellowidget
Android how to hellowidget
 
Enterprise Level Application Architecture with Web APIs using Entity Framewor...
Enterprise Level Application Architecture with Web APIs using Entity Framewor...Enterprise Level Application Architecture with Web APIs using Entity Framewor...
Enterprise Level Application Architecture with Web APIs using Entity Framewor...
 
Meteor.js Workshop by Dopravo
Meteor.js Workshop by DopravoMeteor.js Workshop by Dopravo
Meteor.js Workshop by Dopravo
 
Toms introtospring mvc
Toms introtospring mvcToms introtospring mvc
Toms introtospring mvc
 
Servlet ppt by vikas jagtap
Servlet ppt by vikas jagtapServlet ppt by vikas jagtap
Servlet ppt by vikas jagtap
 

Viewers also liked

Viewers also liked (13)

Part 1 implementing a simple_web_service
Part 1 implementing a simple_web_servicePart 1 implementing a simple_web_service
Part 1 implementing a simple_web_service
 
Part 3 editing a wsdl
Part 3 editing a wsdlPart 3 editing a wsdl
Part 3 editing a wsdl
 
Creating Heathrow's VIP Suites (in Pictures)
Creating Heathrow's VIP Suites (in Pictures)Creating Heathrow's VIP Suites (in Pictures)
Creating Heathrow's VIP Suites (in Pictures)
 
Fernando pessoa
Fernando pessoaFernando pessoa
Fernando pessoa
 
Relationships Final Piece
Relationships Final PieceRelationships Final Piece
Relationships Final Piece
 
Energy basics
Energy basicsEnergy basics
Energy basics
 
DIPLOMA - VALENTINA CRISTINA REYES ABRAJANO
DIPLOMA - VALENTINA CRISTINA REYES ABRAJANODIPLOMA - VALENTINA CRISTINA REYES ABRAJANO
DIPLOMA - VALENTINA CRISTINA REYES ABRAJANO
 
1
11
1
 
Playing Games with Healthcare - serious games in healthcare education and tra...
Playing Games with Healthcare - serious games in healthcare education and tra...Playing Games with Healthcare - serious games in healthcare education and tra...
Playing Games with Healthcare - serious games in healthcare education and tra...
 
Our new, spectacular showroom
Our new, spectacular showroomOur new, spectacular showroom
Our new, spectacular showroom
 
Electica Showroom
Electica ShowroomElectica Showroom
Electica Showroom
 
BrandAsset Valuator - Globale Markenstudie von Y&R
BrandAsset Valuator - Globale Markenstudie von Y&RBrandAsset Valuator - Globale Markenstudie von Y&R
BrandAsset Valuator - Globale Markenstudie von Y&R
 
Adab menjaga-maruah-diri
Adab menjaga-maruah-diriAdab menjaga-maruah-diri
Adab menjaga-maruah-diri
 

Similar to Part 2 generating a client_from_wsdl

Writing simple web services in java using eclipse editor
Writing simple web services in java using eclipse editorWriting simple web services in java using eclipse editor
Writing simple web services in java using eclipse editorSantosh Kumar Kar
 
Background Tasks with Worker Service
Background Tasks with Worker ServiceBackground Tasks with Worker Service
Background Tasks with Worker Servicessusere19c741
 
Configuring an application_server_in_eclipse
Configuring an application_server_in_eclipseConfiguring an application_server_in_eclipse
Configuring an application_server_in_eclipseSupratim Ray
 
Silverlight 2 for Developers - TechEd New Zealand 2008
Silverlight 2 for Developers - TechEd New Zealand 2008Silverlight 2 for Developers - TechEd New Zealand 2008
Silverlight 2 for Developers - TechEd New Zealand 2008Jonas Follesø
 
Windows Phone Workshop: WCF services
Windows Phone Workshop: WCF services Windows Phone Workshop: WCF services
Windows Phone Workshop: WCF services Zayen Chagra
 
Research Inventy : International Journal of Engineering and Science
Research Inventy : International Journal of Engineering and ScienceResearch Inventy : International Journal of Engineering and Science
Research Inventy : International Journal of Engineering and Scienceresearchinventy
 
servlet 2.5 & JSP 2.0
servlet 2.5 & JSP 2.0servlet 2.5 & JSP 2.0
servlet 2.5 & JSP 2.0megrhi haikel
 
Accelerating your application development with IBM BlueMix (Your dream devel...
Accelerating your application development with IBM BlueMix (Your dream devel...Accelerating your application development with IBM BlueMix (Your dream devel...
Accelerating your application development with IBM BlueMix (Your dream devel...Supal Chowdhury
 
Angular - Chapter 3 - Components
Angular - Chapter 3 - ComponentsAngular - Chapter 3 - Components
Angular - Chapter 3 - ComponentsWebStackAcademy
 
EGL Conference 2011 - Technical Workshop
EGL Conference 2011 - Technical WorkshopEGL Conference 2011 - Technical Workshop
EGL Conference 2011 - Technical WorkshopWill Smythe
 
Cloud and Ubiquitous Computing manual
Cloud and Ubiquitous Computing manual Cloud and Ubiquitous Computing manual
Cloud and Ubiquitous Computing manual Sonali Parab
 
Creating & consuming simple web service
Creating & consuming simple web serviceCreating & consuming simple web service
Creating & consuming simple web serviceAbhijit B.
 
Jsp and Servlets
Jsp and ServletsJsp and Servlets
Jsp and ServletsRaghu nath
 
Easy integration of Bluemix services with your applications
Easy integration of Bluemix services with your applicationsEasy integration of Bluemix services with your applications
Easy integration of Bluemix services with your applicationsJack-Junjie Cai
 
Lock-in issues with PaaS
Lock-in issues with PaaSLock-in issues with PaaS
Lock-in issues with PaaSFederico Conte
 
ASP.NET MVC 5 Building Your First Web Application (A Beginner S Guide
ASP.NET MVC 5  Building Your First Web Application (A Beginner S GuideASP.NET MVC 5  Building Your First Web Application (A Beginner S Guide
ASP.NET MVC 5 Building Your First Web Application (A Beginner S GuideAlicia Buske
 
ChircuVictor StefircaMadalin rad_aspmvc3_wcf_vs2010
ChircuVictor StefircaMadalin rad_aspmvc3_wcf_vs2010ChircuVictor StefircaMadalin rad_aspmvc3_wcf_vs2010
ChircuVictor StefircaMadalin rad_aspmvc3_wcf_vs2010vchircu
 

Similar to Part 2 generating a client_from_wsdl (20)

Writing simple web services in java using eclipse editor
Writing simple web services in java using eclipse editorWriting simple web services in java using eclipse editor
Writing simple web services in java using eclipse editor
 
Background Tasks with Worker Service
Background Tasks with Worker ServiceBackground Tasks with Worker Service
Background Tasks with Worker Service
 
Configuring an application_server_in_eclipse
Configuring an application_server_in_eclipseConfiguring an application_server_in_eclipse
Configuring an application_server_in_eclipse
 
Silverlight 2 for Developers - TechEd New Zealand 2008
Silverlight 2 for Developers - TechEd New Zealand 2008Silverlight 2 for Developers - TechEd New Zealand 2008
Silverlight 2 for Developers - TechEd New Zealand 2008
 
Windows Phone Workshop: WCF services
Windows Phone Workshop: WCF services Windows Phone Workshop: WCF services
Windows Phone Workshop: WCF services
 
Research Inventy : International Journal of Engineering and Science
Research Inventy : International Journal of Engineering and ScienceResearch Inventy : International Journal of Engineering and Science
Research Inventy : International Journal of Engineering and Science
 
Asp net-mvc-3 tier
Asp net-mvc-3 tierAsp net-mvc-3 tier
Asp net-mvc-3 tier
 
servlet 2.5 & JSP 2.0
servlet 2.5 & JSP 2.0servlet 2.5 & JSP 2.0
servlet 2.5 & JSP 2.0
 
Accelerating your application development with IBM BlueMix (Your dream devel...
Accelerating your application development with IBM BlueMix (Your dream devel...Accelerating your application development with IBM BlueMix (Your dream devel...
Accelerating your application development with IBM BlueMix (Your dream devel...
 
Angular - Chapter 3 - Components
Angular - Chapter 3 - ComponentsAngular - Chapter 3 - Components
Angular - Chapter 3 - Components
 
EGL Conference 2011 - Technical Workshop
EGL Conference 2011 - Technical WorkshopEGL Conference 2011 - Technical Workshop
EGL Conference 2011 - Technical Workshop
 
ASP.NET Identity
ASP.NET IdentityASP.NET Identity
ASP.NET Identity
 
Cloud and Ubiquitous Computing manual
Cloud and Ubiquitous Computing manual Cloud and Ubiquitous Computing manual
Cloud and Ubiquitous Computing manual
 
Creating & consuming simple web service
Creating & consuming simple web serviceCreating & consuming simple web service
Creating & consuming simple web service
 
Jsp and Servlets
Jsp and ServletsJsp and Servlets
Jsp and Servlets
 
Easy integration of Bluemix services with your applications
Easy integration of Bluemix services with your applicationsEasy integration of Bluemix services with your applications
Easy integration of Bluemix services with your applications
 
Lock-in issues with PaaS
Lock-in issues with PaaSLock-in issues with PaaS
Lock-in issues with PaaS
 
ASP.NET MVC 5 Building Your First Web Application (A Beginner S Guide
ASP.NET MVC 5  Building Your First Web Application (A Beginner S GuideASP.NET MVC 5  Building Your First Web Application (A Beginner S Guide
ASP.NET MVC 5 Building Your First Web Application (A Beginner S Guide
 
ChircuVictor StefircaMadalin rad_aspmvc3_wcf_vs2010
ChircuVictor StefircaMadalin rad_aspmvc3_wcf_vs2010ChircuVictor StefircaMadalin rad_aspmvc3_wcf_vs2010
ChircuVictor StefircaMadalin rad_aspmvc3_wcf_vs2010
 
Major project report
Major project reportMajor project report
Major project report
 

Recently uploaded

Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Nikki Chapple
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesBernd Ruecker
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesManik S Magar
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observabilityitnewsafrica
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024TopCSSGallery
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 

Recently uploaded (20)

Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architectures
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 

Part 2 generating a client_from_wsdl

  • 1. T320 E-business technologies: foundations and practice Block 3 Part 2 Activity 2: Generating a client from WSDL Prepared for the course team by Neil Simpkins Introduction 1 WSDL for client access 2 Static versus dynamic WSDL 3 OU demo services 3 Creating a dynamic web project 4 Adding a simple client 6 More clients 12 Introduction In this activity I shall illustrate how you can quickly and easily generate a client so that you can access a web service. You have in fact already completed this exercise, at least in the main part, when you created the 'Hello' web service and generated a client to test that web service at the same time. However, here there will be a couple of slight differences. Firstly, you will not be producing a web service and a client, just a client for a web service. Secondly, you will explicitly use a WSDL description of the web service on which to base the client. This was also the case 'behind the scenes' when you deployed and tested the 'Hello' service. The client will be generated within Eclipse, which uses the WSDL description of a service to determine how a request to the service should be formulated and what response is expected. The client itself takes the form of a simple set of web pages, just as before when you tested the 'Hello' web service. It's important to recognise that the WSDL document that Eclipse uses to generate the client might be located in an Eclipse project locally on your machine, or it might be hosted on a machine somewhere on the Internet. Copyright © 2008 The Open University. This document is made available under the Creative Commons Attribution - No Derivative Works 3.0 Unported Licence (http://creativecommons.org/licenses/by-nd/3.0/) WEB 00711 3 1.1
  • 2. T320 E-business technologies: foundations and practice WSDL for client access A WSDL service description provides all the information that is required to use a web service. The T320 version of Eclipse incorporates the Web Tools Platform (WTP), which provides support for generating a client based on the information inside a WSDL. The WSDL that describes a service includes a range of crucial information, such as the required content of a request and also the location of the web service. This location, called the endpoint reference (EPR), is included in the service description. The endpoint reference is thus a key item in the service description. If we move the web service then the EPR in all descriptions of the web service needs to be changed. In Figure 1 I have depicted the realisation of the 'Hello' web service after completing the practical activity you carried out in Part 1. The WSDL is held locally in your workspace and will have a local EPR for the web service implementation, such as http://localhost:8080/Hello/services/Hello. Eclipse WTP 3 response 1 parse description and generate client Eclipse project WSDL EPR = http://localhost/ services/HelloService 2 request service deployed and running on local HelloService Tomcat by WTP Eclipse IDE Figure 1 Overview of local access to 'Hello' service with Eclipse When you used Eclipse to deploy the web service and generate a client, it performed a lot of work behind the scenes. It first deployed the web service to the server, started the service running and set up a proxy so that it could pass requests to the service and receive any response. Then it generated the WSDL description of the service and put this into the 'WebContent/wsdl' directory of the project. To generate the client web pages, Eclipse parses the WSDL document. Based on that, it can determine the input requirements for the web service that are used to create the 'Inputs' form etc. The WSDL also tells Eclipse to send requests to the local Tomcat server. This configuration is illustrated by the Eclipse WTP, project and local service depicted in Figure 1; this is, of course, exactly the setup you employed in completing the Part 1 practical activity. If the web service is deployed to a remote server then Eclipse has to be given the location and will download the WSDL for processing; in this respect the two scenarios are not much different. The web service itself can also be situated on a remote server, as specified by the EPR in the service WSDL. This configuration is illustrated in Figure 2. Block 3 Part 2 Activity 2 | 2
  • 3. T320 E-business technologies: foundations and practice 1 download, parse description and generate client some server on Internet WSDL Eclipse IDE EPR = http://somewhere.com/ services/HelloService 2 request service running on somewhere.com server 3 response HelloService 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 style, 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. Block 3 Part 2 Activity 2 | 3
  • 4. T320 E-business technologies: foundations and practice Here you will use a copy of the 'Hello' web service that is hosted at the OU as the service to be accessed by the client. You can just as easily access other services on the Internet or your local implementation of the 'Hello' service in the same way. When you go to this location, if you do not already have a log-in session running then you will be redirected to a log-in page and asked to log in to the University network. Log in with the same username (OUCU) and password that you use to access the T320 course web site. Creating a dynamic web project Start your Block 3 Eclipse and make sure you have a Tomcat server configured for use (see the guide Configuring an Application Server in Eclipse if you are unsure how to do this). Then create a new dynamic project using File > New > Project… (Figure 3). Figure 3 Selecting a new project Then, in the New Project dialogue box, expand the 'Web' option and select 'Dynamic Web Project' (Figure 4) before clicking the 'Next' button. Then give your project a name, such as 'HelloServiceClient', and click 'Finish' (Figure 5). Block 3 Part 2 Activity 2 | 4
  • 5. T320 E-business technologies: foundations and practice Figure 4 Dynamic web project selection Figure 5 Naming the new project Block 3 Part 2 Activity 2 | 5
  • 6. T320 E-business technologies: foundations and practice As Eclipse builds the new project, you will most likely be asked if you wish to open the project in the Java EE perspective (Figure 6). You should click on 'Yes' when this is offered. Figure 6 Dialogue option to open Java EE perspective After a time, the newly created project will be displayed in Eclipse (Figure 7). Figure 7 Newly created project in the Project Explorer Adding a simple client Next you need to add a web service client to the project. To do this, select the project in the Project Explorer and right-click on it. Then select New > Other… as shown in Figure 8. You should then be presented with the dialogue box shown in Figure 9; here, you should open the 'Web Services' folder and select the 'Web Service Client' option before clicking on the 'Next' button. Block 3 Part 2 Activity 2 | 6
  • 7. T320 E-business technologies: foundations and practice Figure 8 Selecting New > Other… to add a client to the project Figure 9 Selecting a wizard to generate a web service client Block 3 Part 2 Activity 2 | 7
  • 8. T320 E-business technologies: foundations and practice You will then be presented with the dialogue box shown in Figure 10. You may well recognise this as including much of the lower section of the dialogue box shown in Figure 16 of the Implementing a simple web service activity that you completed in Part 1 of the block. There are a few differences, the most significant being that here there is a need to specify a 'Service definition'. Figure 10 Initial client configuration dialogue Click on the 'Browse' button at the top of the box. This will take you to the dialogue box shown in Figure 11. Here the topmost text box has the label 'Enter a URI to a 1 WSDL, WSIL or HTML document'. A URI can be entered, which might be the location of a file on your machine or, for example, an HTTP URL. So there is the flexibility to use a WSDL document that resides on your machine or one that can be acquired from the Internet over HTTP (or FTP etc.). When you created the 'Hello' web service, there was at this stage a slightly different text box to complete that requested a 'service implementation'. This you filled with the name of the Java class that implemented the web service logic. Eclipse (and the WTP) then used that code to create the WSDL, which it placed inside your project and then used to generate the client. If you have the 'Hello' project handy (and deployed to your local Tomcat server) then you could point this new client at that local 'Hello' web service. 1 Web Services Inspection Language (WSIL), a joint effort by Microsoft and IBM, is a different approach to describing web services; see, for example, http://www.ibm.com/developerworks/library/specification/ws-wsilspec/. The chief difference between WSDL and WSIL appears to be that WSIL lists groups of web services and their endpoints in an XML format rather than describing a single service. Block 3 Part 2 Activity 2 | 8
  • 9. T320 E-business technologies: foundations and practice Instead of that, here I am going to create a client that uses a remote implementation of the 'Hello' web service over the Internet. Figure 11 Select Service Implementation dialogue box I shall look at the sample web service hosted at the University at the end of this booklet. For now, you should note that the URL for the EPR of the 'Hello' web service at the OU is: http://t320webservices.open.ac.uk/t320/services/HelloService Axis will generate the WSDL document describing a web service if we postfix the EPR with a parameter 'wsdl'. So using a '?' to append this to the URL, we can acquire the WSDL for the 'Hello' service using: http://t320webservices.open.ac.uk/t320/services/HelloService?wsdl You can view the WSDL document by copying this URL into a web browser (Figure 12). Now enter the URL for the WSDL in the Eclipse Select Service Implementation dialogue box. When you have done this, you should see the URL listed in the list of WSDLs under the text 'Select a WSDL' (Figure 13). Block 3 Part 2 Activity 2 | 9
  • 10. T320 E-business technologies: foundations and practice Figure 12 Hello service WSDL listed in a web browser Figure 13 'Hello' service WSDL listed in dialogue box Block 3 Part 2 Activity 2 | 10
  • 11. T320 E-business technologies: foundations and practice At this point it is possible that you will receive a message in a pop-up dialogue box telling you that the WSDL cannot be retrieved. This generally means that the web service is not available. If this is the case, you should raise the matter in the course forums so that the services can be fixed by University staff. If the WSDL is listed then click on the 'OK' button. This will take you back to the client configuration dialogue box (Figure 10). Next raise the slider on the left of the dialogue box so that 'Test client' is displayed (i.e. you want to create a test client), and tick the 'Monitor the Web service' box if you wish to observe messages sent to and received from the web service (Figure 14). Then click the 'Finish' button. Figure 14 Completed client configuration dialogue box After a time, the client will be generated and you will see that the now familiar web pages of the client are shown in Eclipse (Figure 15). As before, you can use the web service by first clicking on the 'HelloName' method in the Methods panel, then entering a name in the text box that appears in the Inputs panel, and finally clicking the 'Invoke' button (Figure 16). Everything in the client appears as it was when you created and tested the 'Hello' web service locally in Part 1. Of course, there is a real difference behind the scenes. The SOAP request to the web service is being sent across the Internet to the OU server 't320webservices.open.ac.uk', and the response is being sent back in the same way from the remote machine. Block 3 Part 2 Activity 2 | 11
  • 12. T320 E-business technologies: foundations and practice Figure 15 Initial client web pages in Eclipse Figure 16 Client after invoking the 'Hello' service More clients You will find the 'Hello' service and others listed on the OU T320 Axis site at: http://t320webservices.open.ac.uk/t320/services/listServices You will find that you can access any of these services using the associated WSDL document that is generated by appending '?wsdl' to the EPR for the service. Try out at least one other service to see how this works. Block 3 Part 2 Activity 2 | 12