SOAPHeader header = context.getEnvelope().getHeader();
OMElement contextHeader = header.getFirstChildWithName(new QName(
"http://airavata.apache.org/schemas/wec/2012/05", "context-header"));
String address = null;
try {
ContextHeaderDocument document = ContextHeaderDocument.Factory.parse(contextHeader.toStringWithConsume());
address = document.getContextHeader().getWorkflowMonitoringContext().getEventPublishEpr();
} catch (XmlException e) {
e.printStackTrace(); // To change body of catch statement use File | Settings | File Templates.
} catch (XMLStreamException e) {
e.printStackTrace(); // To change body of catch statement use File | Settings | File Templates.