Just ask for the kind of object you want, and CXF will abide: webClient.get(String.class); webClient.get(InputStream.class); webClient.get(Document.class); webClient.get(XMLSource.class); // probably what you want for picking through XML output in unit tests webClient.get(JSONObject.class); // this one actually might not be registered by default...
RS On Sat, Jan 9, 2010 at 11:30 AM, KARR, DAVID (ATTCINW) <[email protected]>wrote: > I'm moving forward with my unit tests with the embedded > JAXRSServerFactoryBean. On almost the first try, I got back the object > that I expected. I'm using Mockito to mock the physical resources that > my content controller uses. > > Although it's nice that the server unmarshalled the XML back into my > Java object, I'd actually like to have some testing where I examine the > raw XML or JSON that I get back. I don't see an obvious way to do that > with the WebClient class. Perhaps I shouldn't even be trying, and just > use HttpClient for this kind of test? >
