-
Jun 6th, 2012, 01:20 PM
#1
RestTemplate getForObject() fails for javax.xml.transform.Source
I've got a Spring MVC app that uses RestTemplate to call a webservice from a controller method. Tthe authentication is working and I get an XHTML result when I use a String return object like this:
String result = rest.getForObject(restUrlAdmin, String.class, params);
But I need to parse the result so I want to use xPath with the javax.xml.transform.Source return object, like this:
Source result = rest.getForObject(restUrlAdmin, Source.class, params);
XPathOperations xpath = new Jaxp13XPathTemplate();
String result = xpath.evaluateAsString("//myData", result);
When I run this code it hangs with no java exception. Am I missing something here?
thanks,
Lawrence
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules