axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Illsley" <davidills...@gmail.com>
Subject Fwd: [Axis2] Confusion about the code in AddressingOutHandler.processReplyTo
Date Mon, 14 Aug 2006 15:46:36 GMT
Apologies, forgot the [Axis2] prefix

---------- Forwarded message ----------
From: David Illsley <davidillsley@gmail.com>
Date: 14-Aug-2006 16:44
Subject: Confusion about the code in AddressingOutHandler.processReplyTo
To: axis-dev@ws.apache.org


Hi all,
I've run into a problem with a specific configuration of Axis2 where
for a standard request-response invocation (where
isUseSeparateListener is false) that the following code sets the
ReplyTo to a non-anonymous value that isn't available because of the
(valid) configuration.

private void processReplyTo(SOAPEnvelope envelope, Options
messageContextOptions, MessageContext msgContext, OMNamespace
addressingNamespaceObject, String namespace, boolean replaceHeaders) {
        EndpointReference epr;
        if (!isAddressingHeaderAlreadyAvailable(WSA_REPLY_TO,
envelope, addressingNamespaceObject, replaceHeaders))
        {
            epr = messageContextOptions.getReplyTo();
            if (epr == null) {//optional
                ServiceContext serviceContext = msgContext.getServiceContext();
                if (serviceContext != null &&
                        serviceContext.getMyEPR() != null) {
                    epr = serviceContext.getMyEPR();
                } else {
                    // setting anonymous URI. Defaulting to Final.
                    epr = new EndpointReference(anonymousURI);
                }
            } else if ("".equals(epr.getAddress())) {
                ServiceContext serviceContext = msgContext.getServiceContext();
                if (serviceContext != null &&
                        serviceContext.getMyEPR() != null) {
                    epr.setAddress(serviceContext.getMyEPR().getAddress());
                } else {
                    // setting anonymous URI. Defaulting to Final.
                    epr.setAddress(anonymousURI);
                }
            }
            addToSOAPHeader(epr, AddressingConstants.WSA_REPLY_TO,
envelope, addressingNamespaceObject, namespace, replaceHeaders);
        }
    }

This appears to be the cause of the problem as it's setting the
ReplyTo with non-anon even without isUseSeparateListener being set. I
don't understand why this code exists as setting the ReplyTo to
non-anon is already done explicitly in the OutInAxisOperationClient.

Can anyone enlighten me?
Thanks,
David

--
David Illsley - IBM Web Services Development


-- 
David Illsley - IBM Web Services Development

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Mime
View raw message