I use very simple code that returns XML
RestTemplate restTemplate = new RestTemplate();
Source oResponse = restTemplate.postForObject(url, entity, Source.class,
vars);
XPathOperations xpathTemplate = new Jaxp13XPathTemplate();
String address = xpathTemplate.evaluateAsString("//status", oResponse);
However, I get the following error
java.lang.NoSuchMethodError: org.springframework.util.ClassUtils.forName(Ljava/lang/String;)Ljava/lang/Class;
at org.springframework.xml.JaxpVersion.<clinit>(JaxpVersion.java:51)
at org.springframework.xml.transform.TraxUtils.isStaxSource(TraxUtils.java:70)
at org.springframework.xml.xpath.Jaxp13XPathTemplate.evaluate(Jaxp13XPathTemplate.java:131)
at org.springframework.xml.xpath.Jaxp13XPathTemplate.evaluateAsString(Jaxp13XPathTemplate.java:91)
Please help.
Thanks,
Vladimir
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…