OK it appears it's failing because the MessageContext key "
javax.xml.ws.soap.http.soapaction.uri" (
BindingProvider.SOAPACTION_USE_PROPERTY) is undefined CXF. Is there some
CXF specific way to get the WS-A Action value in at SOAPHandler?


On Wed, May 31, 2017 at 1:02 PM, Me Self <[email protected]> wrote:

> 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);
>
>
>

Reply via email to