String propertySetName = "";
if (xpathForPropertySet != null) {
try {
CachedXPathAPI xpathApi = new org.apache.xpath.CachedXPathAPI();
Document doc = new SourceTransformer().toDOMDocument(in);
XObject propSetXO = xpathApi.eval(doc.getDocumentElement(),xpathForPropertySet);
propertySetName = propSetXO.str();
} catch (Exception e) {
throw new MessagingException("Problem getting the propertySet using XPath", e);
}
} else if (this.propertySet != null) {