super.release();
request.removeSubmitListener(this);
}
public void afterSubmit(Submit submit, SubmitContext context) {
WsrmContainer container = (WsrmContainer) submit.getRequest();
if (request.getWsrmConfig().isWsrmEnabled() && submit.getResponse() != null) {
String content = submit.getResponse().getContentAsString();
XmlOptions options = new XmlOptions();
try {
XmlObject xml = XmlUtils.createXmlObject(content);
String namespaceDeclaration = "declare namespace wsrm='" + request.getWsrmConfig().getVersionNameSpace()
+ "';";
XmlObject result[] = xml.selectPath(namespaceDeclaration + "//wsrm:AcknowledgementRange", options);
if (result.length > 0) {
for (XmlObject aResult : result) {
String upper = aResult.selectAttribute(null, "Upper").getDomNode().getNodeValue();
String lower = aResult.selectAttribute(null, "Lower").getDomNode().getNodeValue();
if (lower.equals(upper)) {
Logger.getLogger("wsrm").info(
"Acknowledgment for message " + upper + " received for identifier: "
+ request.getWsrmConfig().getSequenceIdentifier());
} else {
Logger.getLogger("wsrm").info(
"Acknowledgment for messages " + lower + " to " + upper + " received for identifier: "
+ request.getWsrmConfig().getSequenceIdentifier());
}
}
}
} catch (XmlException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
if (container.getWsrmConfig().isWsrmEnabled()) {
WsdlInterface iface = request.getOperation().getInterface();
WsrmUtils utils = new WsrmUtils(iface.getSoapVersion());
utils.closeSequence(request.getEndpoint(), iface.getSoapVersion(), request.getWsrmConfig()
.getVersionNameSpace(), request.getWsrmConfig().getUuid(), request.getWsrmConfig()
.getSequenceIdentifier(), 1l, request.getOperation());