String dailbackId = stanza.getInnerText().getText();
Entity receiving = EntityImpl.parseUnchecked(stanza.getAttributeValue("from"));
Entity originating = serverRuntimeContext.getServerEnitity();
try {
XMPPServerConnector connector = serverRuntimeContext.getServerConnectorRegistry().connectForDialback(receiving, sessionContext, sessionStateHolder);
/*
<db:verify
from='target.tld'
id='417GAF25'
to='sender.tld'>
38b501ec606752318f72ad53de17ac6d15f86257485b0d8f5d54e1f619e6b869
</db:verify>
*/
StanzaBuilder verifyBuilder = new StanzaBuilder("verify", NamespaceURIs.JABBER_SERVER_DIALBACK, "db");
verifyBuilder.addAttribute("from", originating.getFullQualifiedName());
verifyBuilder.addAttribute("to", receiving.getFullQualifiedName());
verifyBuilder.addAttribute("id", sessionContext.getSessionId());
verifyBuilder.addText(dailbackId);
connector.write(verifyBuilder.build());
return null;
} catch (Exception e) {
StanzaBuilder builder = new StanzaBuilder("result", NamespaceURIs.JABBER_SERVER_DIALBACK, "db");
builder.addAttribute("from", originating.getDomain());
builder.addAttribute("to", receiving.getDomain());