Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using and testing web services in Eclipse

Can you tell the BEST way how to test & use Web Services in Eclipse ?

I had little experience with web services, that is, I used an Apache Axis plugin that generated the client stub.

I do not need to write my own web services right now, only use existing ones. I have Eclipse Java EE, I can download any plugin. What would you suggest?

like image 591
EugeneP Avatar asked Jan 19 '10 08:01

EugeneP


People also ask

How do I get web services in eclipse?

A wizard is provided by Eclipse for these purposes. Select the 'Hello. java' class in the Project Explorer (highlighted in Figure 14) and go to File > New > Other…; then open the 'Web Services' folder and select 'Web Service' (Figure 15). Then click 'Next'.

How do I open web service test client in Eclipse?

Open File -> New -> Other... -> Web Services -> Web Service Client. Select Test the Web service and Overwrite files without warning . Click Next.


3 Answers

To test web services, the best tool is IMHO soapUI which is available as an eclipse plugin and is superior by far to any other tool I've used.

To use web services, it's worth noting that Eclipse has now a JAX-WS Tools Project (in the Web Tools Incubator) which is using the Apache CXF implementation (please, let Axis 2 die).

To install this project, point your Eclipse update site manager to The Eclipse Web Tools Platform (WTP) Project update site - http://download.eclipse.org/webtools/updates. When you access the update site, you should see the CXF Web Services (Incubator) feature available in the listing:

alt text

Once installed and configured (Window > Preferences... > Web Services > CXF 2.x Preferences), you will be able to use the CXF runtime to test web services (and / or to create a CXF Web Services Project, see image below even if this is not your first goal).

alt text
(source: corneliadavis.com)

You will find some video clips showing you how to create and deploy Bottom-Up and Top-Down Web services using JAX-WS Tools here.

like image 77
Pascal Thivent Avatar answered Nov 10 '22 22:11

Pascal Thivent


Your Java EE Eclipse already includes WTP (Web Tool Platform), so you shouldn't download another plugin.

All you need now is to follow one of those tutorials


WTP:

The Eclipse Web Tools Platform (WTP) project extends the Eclipse platform with tools for developing Web and Java EE applications

It includes a web services section with 2 components:

  • The JST Web services component contains tools for developing and interacting with Java Web services.
  • The WST Web services component contains tools for Web services development which is not Java specific.
like image 34
VonC Avatar answered Nov 10 '22 21:11

VonC


Take a look at Eclipse Swordfish project.

From it's home page:

The goal of the Swordfish project is to provide an extensible SOA framework based on the proven Eclipse Equinox runtime technology. The framework is designed to be complemented by additional open source components such as a service registry, a messaging system, a process engine etc. to form a comprehensive open source SOA runtime environment based on both established and emerging open standards.

like image 21
Roland Tepp Avatar answered Nov 10 '22 20:11

Roland Tepp