| Author |
Unit Testing Web Services
|
Rakesh Jhamb
Ranch Hand
Joined: Jun 18, 2003
Posts: 154
|
|
Hello All,
We have a project that uses JAX-WS and JAXB for webservices.
We want to write Junit Test cases for testing web services.
The client side i.e. Junit will need stubs to be generated to test the actual web service using tool wsgen. We want to automate this process of generating stubs in a standard manner using Ant Build script.
Can anyone share a sample build script that is generating these artifacts. Please share the same.
Also share a standard practice for unit testing web services.
Thanks
|
SCJP2, SCWCD
|
 |
Aditya Kumar
Ranch Hand
Joined: Oct 31, 2006
Posts: 46
|
|
Also share a standard practice for unit testing web services.
Basically ours are text/xml based webservices -- meaning that the response we expect does not contain binary data. For unit testing this we use a simple Http Request/Response client. We feed this client with the URL of the webservice and the request XML and that is fired over an HTTP connection to the URL. The response XML is then displayed and we can compare it to what we expect it to be.
It would be insightful to know how the developers go about testing their web services...
|
 |
Martijn Verburg
author
Bartender
Joined: Jun 24, 2003
Posts: 3268
|
|
There are some good resources that you can Google on this including:
Dr Dobbs article
WSUnit - A JUnit for web services
|
Cheers, Martijn - Blog,
Twitter, PCGen, Ikasan, My The Well-Grounded Java Developer book!,
My start-up.
|
 |
 |
|
|
subject: Unit Testing Web Services
|
|
|