File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes Testing web services Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Testing web services" Watch "Testing web services" New topic
Author

Testing web services

Aditya Kumar
Ranch Hand

Joined: Oct 31, 2006
Posts: 50
I started developing/working with web services on Java on the weblogic server platform a few months back. This area is still relatively new to me. What I would like to know is how do generally developers go about testing web services before they deploy it for real time usage. The way we do it here is by triggering the input XML to the web service URL using a simple customized Http Client. In sends the input xml as HTTP Post request to the server and waits for a response. I would like to know if there are other ways/tools of doing this.

Responses appreciated.
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
There is an excellent tool called soapUI that can test SOAP and REST web services etc:
soapUI is the most used testing tool in the world for:
* Inspecting Web Services
* Invoking Web Services
* Developing Web Services
* Web Service Simulation and Web Service Mocking
* Functional Testing of Web Services
* Load Testing of Web Services

http://www.soapui.org/
There is a free version and a commercial, pro, version.
No, I am in no way affiliated with the people developing soapUI.
Best wishes!
Aditya Kumar
Ranch Hand

Joined: Oct 31, 2006
Posts: 50
Hi,

Thanks for the reply Ivan.

I have used SoapUI but only briefly and I thought it was heavy. I mean, if you look from a developers point of view who is running the webserver on his local machine and working on the code, I think the unit testing tool should cover the bare minimum needs of testing (unit). Something that just reflects the changes in the code. Soap UI is a little heavy on the system I thought.

I am just thinking, isn't using a HTTP client like the one I mentioned in the beginning, the norm?

- Aditya
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
Take a look at this web page: http://www.soapui.org/userguide/commandline/testcaserunner.html
It describes how a test case created in soapUI can be run from a JUnit test.
Thus: You can create the tests with soapUI and later execute them from a JUnit test, independent of the soapUI application.

Yes, of course you can use HttpClient and "roll your own" web service testing framework. Before you do, take a look on the internet - I guess someone must have already done something like this.
Best wishes!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Testing web services
 
Similar Threads
IBM XML or SCDJWS?
Unit Testing Web Services
Web services and J2EE
What is your role as a WS developer?
JAX-WS2 dynamical creation of response wrapper bean Class