Unit testing Apache CXF RESTful services - code available

· Read in about 1 min · (178 words) ·

So, the original post on the topic written about two and a half years ago had code snippets, but there’s been comments and PMs for the complete code. So last week, as I resurrected this blog, decided to get that code out on github. Unfortunately, that was easier said than done; it has been quite some time and frankly, I’d lost the code. I must’ve switched machines about 3 times in the interim and gone from SVN to github for personal projects. Some hunting around ensued and thankfully, I was able to find the actual code we wrote based on the sample I’d posted. So cleaned that up - and just extracted the unit testing example out of it and pushed it to github - get it here. I haven’t updated any of the dependencies - so this is still running against spring 2.5 and cxf 2.2.3 (I think) and things might’ve changed quite a bit since then (I haven’t used the JAXRS bits of CXF much after that)

Running tests:

mvn test

Running the server:

mvn jetty:run