Hi All
Another issue I'm facing in migrating to CXF (2.6.16) is that adding a WS-A
header results in a nullptr. I can't use the standard JAX-WS WSA Feature
mechanism because it creates a variation of WS-A the the sevice endpoint
does not consume. This is the custom WS-A handler of which the very last
line fails with a nullptr - anyone know it doesnt return a SOAPElement
"action"?
if (isOutbound(messageContext)) {
SOAPHeader header =
messageContext.getMessage().getSOAPPart().getEnvelope().getHeader();
if (header == null) {
header =
messageContext.getMessage().getSOAPPart().getEnvelope().addHeader();
}
header.addNamespaceDeclaration(WS_ADDRESS_PREFIX,
WS_ADDRESS_NAMESPACE);
SOAPElement msgID = header.addChildElement(WS_ADDRESS_MESSAGEID,
WS_ADDRESS_PREFIX);
msgID.addTextNode("...");
SOAPElement to = header.addChildElement(WS_ADDRESS_RELATES_TO,
WS_ADDRESS_PREFIX);
to.addTextNode("...");
SOAPElement from = header.addChildElement(WS_ADDRESS_FROM,
WS_ADDRESS_PREFIX);
SOAPElement address = from.addChildElement(WS_ADDRESS_ADDRESS,
WS_ADDRESS_PREFIX);
address.addTextNode(portalName);
String action = (String) messageContext.get(MSG_CONTEXT_SOAPACTION);
SOAPElement action = header.addChildElement(WS_ADDRESS_ACTION,
WS_ADDRESS_PREFIX);
action.addTextNode(action);