ex.printStackTrace();
}
}
public SAXSource invoke(SAXSource request) {
SAXSource response = new SAXSource();
try {
DOMResult domResult = new DOMResult();
Transformer transformer = TransformerFactory.newInstance().newTransformer();
transformer.transform(request, domResult);
Node n = domResult.getNode().getFirstChild();
while (n.getNodeType() != Node.ELEMENT_NODE) {
n = n.getNextSibling();
}
if (n.getLocalName().equals(sayHi.getLocalPart())) {
response.setInputSource(sayHiInputSource);
} else if (n.getLocalName().equals(greetMe.getLocalPart())) {
response.setInputSource(greetMeInputSource);
}
} catch (Exception ex) {
ex.printStackTrace();
}
return response;