Laurent Hinoul

“Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.” - John F. Woods

How to unit test a web service

To test your web service,n you can use Smock. Smock compares your request with the response by XML files. You just need a response.xml file with your response and a request.xml file with your request.

Maven:

Jar:

http://mvnrepository.com/artifact/net.javacrumbs/smock-easymock

Code:

More info:

https://code.google.com/p/smock/

Leave a Reply