Feb 20 2009
Eclipse plug-in as a web service client
Recently I was playing around consuming web service inside Eclipse plug-in. Making simple web service call maybe a bit tricky at the beginning. I’m going to provide quick start instruction here,
Required software:
- Eclipse for RCP/Plug-in Developer
- JEE Standard Tools & Axis

Configuration steps:
- Define new JEE service in a workspace

- Create new plug-in project

- Add following dependencies to the plug-in:
- org.apache.commons.logging
- javax.wsdl
- javax.xml.rpc
- javax.xml.soap
- org.apache.commons.discovery
- org.apache.axis

- Generate web service client code

Consume web service:
Using web service in side a plug-in is no different than anyone else. Sample of invoking web service method:
TransportServiceSoap service = new TransportServiceLocator().getTransportServiceSoap(); service.getCities();
Instruction presented above is based on Eclipse 3.4.1 and uses sample web service from http://www.urbanlife.pl/
why I haven’t seen you earlier on Eclipse Planet!? Great to hear more from Poland
It’s sad that this integration is done with Axis which has many many problems IMHO starting from performance problems to memory leaks (leak is the wrong term it’s a black hole) that you can’t transfer.
Great post Radoslaw, I’m curious will the socket connections made route through the proxy settings setup in Eclipse?
Hello,
thanks for the info provided can you let me know how to create a web service client in RCP application using web service runtime: Apache axis2 rather than axis..
Eagerly waiting for reply,,,