}
}
}
public void onReply(Context context) throws Exception {
SoapMessage in = context.getInMessage();
SoapMessage out = context.getOutMessage();
Map headers = in.getHeaders();
if (headers != null) {
for (Iterator it = headers.keySet().iterator(); it.hasNext();) {
QName qname = (QName) it.next();
Object value = headers.get(qname);
if (isWSANamespace(qname.getNamespaceURI())) {
if (EL_MESSAGE_ID.equals(qname.getLocalPart())) {
QName name = new QName(qname.getNamespaceURI(), EL_MESSAGE_ID, qname.getPrefix() != null ? qname.getPrefix() : WSA_PREFIX);
DocumentFragment df = createHeader(name, idGenerator.generateSanitizedId());
out.addHeader(name, df);
name = new QName(qname.getNamespaceURI(), EL_RELATES_TO, qname.getPrefix() != null ? qname.getPrefix() : WSA_PREFIX);
df = createHeader(name, getHeaderText(value));
out.addHeader(name, df);
}
}
}
}
}