users@glassfish.java.net

Re: WS-Addressing Action header

From: <glassfish_at_javadesktop.org>
Date: Fri, 05 Dec 2008 05:04:46 PST

A code snippet from com.sun.xml.ws.addressing.WsaTubeHelper

    /**
     * This method gives the Input addressing Action for a message.
     * It gives the Action set in the wsdl operation for the corresponding payload.
     * If it is not explicitly set, it gives the soapAction
     * @param packet
     * @return input Action
     */
    public String getEffectiveInputAction(Packet packet) {
        //non-default SOAPAction beomes wsa:action
        if(packet.soapAction != null && !packet.soapAction.equals(""))
                return packet.soapAction;
        String action = null;

        if (wsdlPort != null) {
            WSDLBoundOperation wbo = wsdlPort.getBinding().getOperation(packet.getMessage().getPayloadNamespaceURI(), packet.getMessage().getPayloadLocalPart());
            if (wbo != null) {
                WSDLOperation op = wbo.getOperation();
                action = op.getInput().getAction();
            } else
                action = packet.soapAction;
        } else {
            action = packet.soapAction;
        }
        return action;
    }

If SOAPAction http header is filled in then its value is used as WS-Addressing action header. But according to the specification SOAPAction should be URI surrounded with quotes and wsa:action is just xs:anyURI with no quotes mentioned. So is it a bug of jax-ws?
[Message sent by forum member 'vzhilyaev' (vzhilyaev)]

http://forums.java.net/jive/thread.jspa?messageID=320276