in src/org/apache/kandula/wsat/AbstractATNotifierStub.java [82:128]
protected void notify(String localName, String action, int opIndex,
EndpointReference replyToEPR) throws AbstractKandulaException {
MessageContext messageContext;
try {
messageContext = new MessageContext();
final OperationClient client = _serviceClient
.createClient(operations[opIndex].getName());
Options options = client.getOptions();
SOAPFactory factory = OMAbstractFactory.getSOAP12Factory();
SOAPEnvelope env = factory.getDefaultEnvelope();
OMNamespace wsAT = factory.createOMNamespace(Constants.WS_AT,
"wsat");
OMElement request = factory.createOMElement(localName, wsAT);
env.getBody().addChild(request);
messageContext.setEnvelope(env);
options.setTo(this.toEPR);
if (replyToEPR != null) {
options.setReplyTo(replyToEPR);
} else {
options.setReplyTo(new EndpointReference(
"http://www.w3.org/2005/08/addressing/none"));
}
options.setAction(action);
client.addMessageContext(messageContext);
/*
* TODO: Fix the following hacking till we get fire and forget
* corretly in Axis2
*/
Thread thread = new Thread(new Runnable() {
public void run() {
try {
client.execute(false);
} catch (AxisFault e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
});
thread.start();
} catch (AxisFault e) {
throw new KandulaGeneralException(e);
}
}