Hi all, Chamikara and I have been discussing a Sandesha issue on sandesha-dev, and he's proposed a solution that needs a new Axis2 constant. I think that's probably the way to go, so I've opened a Jira: https://issues.apache.org/jira/browse/AXIS2-2191
Please let me know if you have any comments, I hope to get a patch together soon. Matt "Chamikara Jayalath" <[EMAIL PROTECTED]> wrote on 15/02/2007 12:44:21: > Hi Matt, > > One way may be to introduce an property which if set causes the > optimization to be skipped. We can set this at the GlobalInHandler. > > Chamikara > > > On 2/15/07, Matthew Lovett <[EMAIL PROTECTED]> wrote: > Hi Chamikara, > > I see what you are trying to avoid, but as you agreed - there are cases > where this doesn't work. 2 examples: > An in-only MEP with an anonymous acksTo (where we need to keep the > backchannel) > An in-out MEP with a non-anonymous replyTo, but an anonymous acksTo > (again, we need the backchannel) > > I think perhaps the code in the DispatchPhase is jumping the gun a bit. I > think that the RM Phase (e.g . our SandeshaInHandler) needs to decide if it > needs the transport, before this optimization can run. Perhaps the right > thing to do is to move this block of logic into some point a little later > on? > > As for moving the RM ack logic earlier, e.g. up to the GlobalInHandler, > I'm not sure if we can do that. I recently moved some of the logic from > the global handler down into the in handler becase it needed the operation > to have been resolved. If we did store the inbound message here (and send > the ack) then I think that we'd need to modify the code so that it always > uses an invoker, and do most of the processing downstream from there. > Perhaps worth thinking about. > > Thanks > > Matt > > "Chamikara Jayalath" <[EMAIL PROTECTED]> wrote on 14/02/2007 23:36:53: > > > Hi Matt, > > > On 2/14/07, Matthew Lovett < [EMAIL PROTECTED]> wrote: > > Hi Chamikara, > > > > Can you explain the changes to the module.xml a bit for me? I'm afraid > > that I don't quite follow your reasoning. Here's why: > > > > If we are trying to change the server-side behaviour, > > > > Yes. Its the sever side that I'm trying to fix. > > > > that implies that > > the server-side-servlet serving the request is confused by the "1-way" > ops > > that produce a response. If that is the case then we haven't solved the > > whole issue, as a user's 1-way op could result in an ackMessage that > needs > > to flow on the backchannel, and presumably the servlet would be just as > > confused by this! I think the only place to fix that would be in the > > servlet itself, and that means that we could leave the module.xml alone > - > > with definitions that follow the spec. > > > > > > The reason for this fix was the lines 71-91 of the DiapatchPhase > > class. For InOnly messages the transport headers get written (For > > e.g. HTTP 202) before the messages reach our handler. Because of > > this whatever the response we write goes with the HTTP 202 response > > code and that get ignored by the Axis2 client side. > > The RequestResponseTransport.acknowledgeMessage() method hs been > > fully implemented only for the Servlet case. So this is not visible > > in test cases (i.e. with SAS). > > > > Didn't get what u meant by 'definitions that follow the spec'. > > AckRequested is actually an InOut message and it is correct to move > > it there. Yes TerminateSequence is a problem, but we hv a scenario > > where it works as InOut. > > As for the LastMessage, the latest interops with Msft showed that it > > comes without a MessageID, so I guessed that it hs to be moved back > > to the InOnly group. > > > > Yes, the problem is still there for InOnly messages that needs an > > Ack. May be we should do early acking at the GlobalInHandler. Or is > > there a better way ? > > > > Chamikara > > > > > > If it isn't the service side, but actually the client side that we are > > trying to fix, then the module.xml is not as relevant as the code in > > SpecSpecificConstants::getWSRMOperationType. However, you didn't change > > that, so I'm assuming that it is server side that we need to worry > about. > > > > Do you actually have a test case that is impacted by the module.xml > change > > you put in? > > > > Thanks > > > > Matt > > > > [EMAIL PROTECTED] wrote on 13/02/2007 16:58:15: > > > > > Author: chamikara > > > Date: Tue Feb 13 08:58:14 2007 > > > New Revision: 507097 > > > > > > URL: http://svn.apache.org/viewvc?view=rev&rev=507097 > > > Log: > > > changed AckRequest, LastMessage and TerminateSequence ActionMappings > > > to the RMInOutOperation. Having them as InOnly caused > > > the response to come with 202 in the Servlet case. > > > > > > Changed the places where we create contexts to use the ContextFactory. > > > > > > Modified: > > > webservices/sandesha/trunk/java/config/client_axis2.xml > > > webservices/sandesha/trunk/java/config/module.xml > > > webservices/sandesha/trunk/java/config/server_axis2.xml > > > > > > > > > webservices/sandesha/trunk/java/src/org/apache/sandesha2/msgprocessors/AckRequestedProcessor. > > > java > > > > > > > > > webservices/sandesha/trunk/java/src/org/apache/sandesha2/msgprocessors/CloseSequenceProcessor. > > > java > > > > > > > > > webservices/sandesha/trunk/java/src/org/apache/sandesha2/msgprocessors/MakeConnectionProcessor. > > > java > > > > > > > > > webservices/sandesha/trunk/java/src/org/apache/sandesha2/msgprocessors/TerminateSeqMsgProcessor. > > > java > > > > > > > > > webservices/sandesha/trunk/java/src/org/apache/sandesha2/util/AcknowledgementManager. > > > java > > > > > > > > > webservices/sandesha/trunk/java/src/org/apache/sandesha2/workers/SenderWorker. > > > java > > > > > > Modified: webservices/sandesha/trunk/java/config/client_axis2.xml > > > URL: http://svn.apache. > > > org/viewvc/webservices/sandesha/trunk/java/config/client_axis2.xml? > > > view=diff&rev=507097&r1=507096&r2=507097 > > > > > > ============================================================================== > > > --- webservices/sandesha/trunk/java/config/client_axis2.xml (original) > > > > +++ webservices/sandesha/trunk/java/config/client_axis2.xml Tue Feb > > > 13 08:58:14 2007 > > > @@ -96,6 +96,7 @@ > > > class="org.apache.axis2.transport.http . > > > CommonsHTTPTransportSender"> > > > <parameter name="PROTOCOL" > locked="false">HTTP/1.1</parameter> > > > <parameter name="Transfer-Encoding" > > > locked="false">chunked</parameter> > > > + <!-- <parameter name="OmitSOAP12Action" > > > locked="false">true</parameter> --> > > > </transportSender> > > > <transportSender name="https" > > > class="org.apache.axis2.transport.http. > > > CommonsHTTPTransportSender"> > > > > > > Modified: webservices/sandesha/trunk/java/config/module.xml > > > URL: http://svn.apache. > > > org/viewvc/webservices/sandesha/trunk/java/config/module.xml? > > > view=diff&rev=507097&r1=507096&r2=507097 > > > > > > ============================================================================== > > > --- webservices/sandesha/trunk/java/config/module.xml (original) > > > +++ webservices/sandesha/trunk/java/config/module.xml Tue Feb 13 > > 08:58:14 2007 > > > @@ -40,14 +40,10 @@ > > > <messageReceiver class=" org.apache.sandesha2.msgreceivers. > > > RMMessageReceiver"/> > > > > > > <!-- namespaces for the 2005-02 spec --> > > > - <actionMapping>http://schemas.xmlsoap . > > > org/ws/2005/02/rm/TerminateSequence</actionMapping> > > > <actionMapping> http://schemas.xmlsoap. > > > org/ws/2005/02/rm/SequenceAcknowledgement</actionMapping> > > > - <actionMapping> http://schemas.xmlsoap. > > > org/ws/2005/02/rm/AckRequested</actionMapping> > > > - <actionMapping> http://schemas.xmlsoap. > > > org/ws/2005/02/rm/LastMessage</actionMapping> > > > > > > <!-- namespaces for the 2006-08 spec --> > > > <actionMapping> http://docs.oasis-open.org/ws- > > > rx/wsrm/200608/SequenceAcknowledgement</actionMapping> > > > - <actionMapping> http://docs.oasis-open.org/ws- > > > rx/wsrm/200608/AckRequested</actionMapping> > > > </operation> > > > > > > <operation name="RMInOutOperation" mep=" http://www.w3. > > > org/2006/01/wsdl/in-out"> > > > @@ -55,7 +51,17 @@ > > > > > > <!-- namespaces for the 2005-02 spec --> > > > <actionMapping> http://schemas.xmlsoap. > > > org/ws/2005/02/rm/CreateSequence</actionMapping> > > > - > > > + <actionMapping> http://schemas.xmlsoap . > > > org/ws/2005/02/rm/AckRequested</actionMapping> > > > + > > > + <!-- For interoparability perposes. Some WSRM > > > implementations tend to send this as the LastMessage, > > + > > > replied with an ack --> > > > + <actionMapping>http://schemas.xmlsoap . > > > org/ws/2005/02/rm/LastMessage</actionMapping> > > > + <actionMapping>http://docs.oasis-open.org/ws- > > > rx/wsrm/200608/AckRequested</actionMapping> > > > + > > > + <!-- TerminateSequence works as a InOut in RM 1.0 > > > anonymous scenario --> > > > + <actionMapping>http://schemas.xmlsoap. > > > org/ws/2005/02/rm/TerminateSequence</actionMapping> > > > + > > > + > > > <!-- namespaces for the 2006-08 spec --> > > > <actionMapping> http://docs.oasis-open.org/ws- > > > rx/wsrm/200608/CreateSequence</actionMapping> > > > <actionMapping>http://docs.oasis-open.org/ws- > > > rx/wsrm/200608/CloseSequence</actionMapping> > > > > > > Modified: webservices/sandesha/trunk/java/config/server_axis2.xml > > > URL: http://svn.apache. > > > org/viewvc/webservices/sandesha/trunk/java/config/server_axis2.xml? > > > view=diff&rev=507097&r1=507096&r2=507097 > > > > > > ============================================================================== > > > --- webservices/sandesha/trunk/java/config/server_axis2.xml (original) > > > +++ webservices/sandesha/trunk/java/config/server_axis2.xml Tue Feb > > > 13 08:58:14 2007 > > > @@ -97,6 +97,7 @@ > > > class=" org.apache.axis2.transport.http. > > > CommonsHTTPTransportSender"> > > > <parameter name="PROTOCOL" > locked="false">HTTP/1.1</parameter> > > > <parameter name="Transfer-Encoding" > > > locked="false">chunked</parameter> > > > + <!-- <parameter name="OmitSOAP12Action" > > > locked="false">true</parameter> --> > > > </transportSender> > > > <transportSender name="https" > > > class=" org.apache.axis2.transport.http. > > > CommonsHTTPTransportSender"> > > > > > > Modified: > > > > > > webservices/sandesha/trunk/java/src/org/apache/sandesha2/msgprocessors/AckRequestedProcessor. > > > java > > > URL: http://svn.apache. > > > > > > org/viewvc/webservices/sandesha/trunk/java/src/org/apache/sandesha2/msgprocessors/AckRequestedProcessor. > > > java?view=diff&rev=507097&r1=507096&r2=507097 > > > > > > ============================================================================== > > > --- > > > > > > webservices/sandesha/trunk/java/src/org/apache/sandesha2/msgprocessors/AckRequestedProcessor. > > > java (original) > > > +++ > > > > > > webservices/sandesha/trunk/java/src/org/apache/sandesha2/msgprocessors/AckRequestedProcessor. > > > java Tue Feb 13 08:58:14 2007 > > > @@ -30,6 +30,7 @@ > > > import org.apache.axis2.Constants ; > > > import org.apache.axis2.addressing.EndpointReference; > > > import org.apache.axis2.context.ConfigurationContext; > > > +import org.apache.axis2.context.ContextFactory ; > > > import org.apache.axis2.context.MessageContext ; > > > import org.apache.axis2.context.OperationContext; > > > import org.apache.axis2.context.ServiceContext; > > > @@ -184,8 +185,10 @@ > > > if (rmMsgCtx.getMessageContext().getOperationContext() == > > null) { > > > // operation context will be null when doing in a GLOBAL > > > // handler. > > > + > > > ServiceContext serviceCtx = > msgContext.getServiceContext(); > > > - OperationContext opCtx = new > > > OperationContext(ackOperation, serviceCtx); > > > + OperationContext opCtx = ContextFactory. > > > createOperationContext(ackOperation, serviceCtx); > > > + > > > rmMsgCtx.getMessageContext ().setOperationContext(opCtx); > > > } > > > > > > @@ -292,8 +295,11 @@ > > > getRMVersion(), > > > getMsgContext().getAxisService()); > > > getMsgContext().setAxisOperation(ackOperation); > > > + > > > ServiceContext serviceCtx = > getMsgContext().getServiceContext(); > > > - OperationContext opcontext = new > > > OperationContext(ackOperation, serviceCtx); > > > + OperationContext opcontext = ContextFactory. > > > createOperationContext(ackOperation, serviceCtx); > > > + opcontext.setParent(getMsgContext().getServiceContext()); > > > + > > > getConfigurationContext(). > > > registerOperationContext(ackRequestRMMsg.getMessageId (), opcontext); > > > getMsgContext().setOperationContext(opcontext); > > > > > > > > > Modified: > > > > > > webservices/sandesha/trunk/java/src/org/apache/sandesha2/msgprocessors/CloseSequenceProcessor. > > > java > > > URL: http://svn.apache. > > > > > > org/viewvc/webservices/sandesha/trunk/java/src/org/apache/sandesha2/msgprocessors/CloseSequenceProcessor. > > > java?view=diff&rev=507097&r1=507096&r2=507097 > > > > > > ============================================================================== > > > --- > > > > > > webservices/sandesha/trunk/java/src/org/apache/sandesha2/msgprocessors/CloseSequenceProcessor. > > > java (original) > > > +++ > > > > > > webservices/sandesha/trunk/java/src/org/apache/sandesha2/msgprocessors/CloseSequenceProcessor. > > > java Tue Feb 13 08:58:14 2007 > > > @@ -24,6 +24,7 @@ > > > import org.apache.axiom.soap.SOAPFactory ; > > > import org.apache.axis2.AxisFault; > > > import org.apache.axis2.context.ConfigurationContext; > > > +import org.apache.axis2.context.ContextFactory ; > > > import org.apache.axis2.context.MessageContext ; > > > import org.apache.axis2.context.OperationContext; > > > import org.apache.axis2.description.AxisOperation; > > > @@ -172,7 +173,10 @@ > > > rmMsgCtx.getMessageContext().getAxisService()); > > > getMsgContext().setAxisOperation(closeOperation); > > > > > > - OperationContext opcontext = new > > > OperationContext(closeOperation, getMsgContext().getServiceContext()); > > > + > > > + OperationContext opcontext = ContextFactory. > > > createOperationContext(closeOperation, > > getMsgContext().getServiceContext()); > > > + opcontext.setParent(getMsgContext().getServiceContext()); > > > + > > > getConfigurationContext().registerOperationContext(rmMsgCtx. > > > getMessageId(),opcontext); > > > getMsgContext().setOperationContext(opcontext); > > > > > > > > > Modified: > > > > > > webservices/sandesha/trunk/java/src/org/apache/sandesha2/msgprocessors/MakeConnectionProcessor. > > > java > > > URL: http://svn.apache . > > > > > > org/viewvc/webservices/sandesha/trunk/java/src/org/apache/sandesha2/msgprocessors/MakeConnectionProcessor. > > > java?view=diff&rev=507097&r1=507096&r2=507097 > > > > > > ============================================================================== > > > --- > > > > > > webservices/sandesha/trunk/java/src/org/apache/sandesha2/msgprocessors/MakeConnectionProcessor. > > > java (original) > > > +++ > > > > > > webservices/sandesha/trunk/java/src/org/apache/sandesha2/msgprocessors/MakeConnectionProcessor. > > > java Tue Feb 13 08:58:14 2007 > > > @@ -7,8 +7,10 @@ > > > import org.apache.axis2.AxisFault ; > > > import org.apache.axis2.Constants; > > > import org.apache.axis2.context.ConfigurationContext; > > > +import org.apache.axis2.context.ContextFactory ; > > > import org.apache.axis2.context.MessageContext ; > > > import org.apache.axis2.context.OperationContext; > > > +import org.apache.axis2.context.OperationContextFactory; > > > import org.apache.axis2.description.AxisOperation; > > > import org.apache.axis2.description.TransportOutDescription ; > > > import org.apache.commons.logging.Log; > > > @@ -144,7 +146,9 @@ > > > OperationContext context = pollMessage.getMessageContext(). > > > getOperationContext(); > > > if(context == null) { > > > AxisOperation oldOperation = > returnMessage.getAxisOperation(); > > > - context = new OperationContext(oldOperation, > > > returnMessage.getServiceContext()); > > > + > > > + context = ContextFactory. > > > createOperationContext(oldOperation, returnMessage. > > > getServiceContext()); //new OperationContext(oldOperation); > > > + > > > context.addMessageContext(pollMessage.getMessageContext()); > > > pollMessage.getMessageContext().setOperationContext(context); > > > } > > > > > > Modified: > > > > > > webservices/sandesha/trunk/java/src/org/apache/sandesha2/msgprocessors/TerminateSeqMsgProcessor. > > > java > > > URL: http://svn.apache. > > > > > > org/viewvc/webservices/sandesha/trunk/java/src/org/apache/sandesha2/msgprocessors/TerminateSeqMsgProcessor. > > > java?view=diff&rev=507097&r1=507096&r2=507097 > > > > > > ============================================================================== > > > --- > > > > > > webservices/sandesha/trunk/java/src/org/apache/sandesha2/msgprocessors/TerminateSeqMsgProcessor. > > > java (original) > > > +++ > > > > > > webservices/sandesha/trunk/java/src/org/apache/sandesha2/msgprocessors/TerminateSeqMsgProcessor. > > > java Tue Feb 13 08:58:14 2007 > > > @@ -23,6 +23,7 @@ > > > import org.apache.axis2.AxisFault ; > > > import org.apache.axis2.addressing.EndpointReference; > > > import org.apache.axis2.context.ConfigurationContext ; > > > +import org.apache.axis2.context.ContextFactory; > > > import org.apache.axis2.context.MessageContext ; > > > import org.apache.axis2.context.OperationContext; > > > import org.apache.axis2.context.OperationContextFactory ; > > > @@ -366,9 +367,10 @@ > > > Sandesha2Constants.MessageTypes.TERMINATE_SEQ , > > > rmMsgCtx.getRMSpecVersion(), > > > getMsgContext().getAxisService()); > > > - OperationContext opcontext = OperationContextFactory > > > - .createOperationContext( > > > - WSDLConstants.MEP_CONSTANT_OUT_IN, terminateOp, > > > getMsgContext().getServiceContext()); > > > + > > > + OperationContext opcontext = ContextFactory. > > > createOperationContext(terminateOp, > > getMsgContext().getServiceContext()); > > > + opcontext.setParent(getMsgContext().getServiceContext()); > > > + > > > getConfigurationContext().registerOperationContext(rmMsgCtx. > > > getMessageId(), opcontext); > > > > > > getMsgContext().setOperationContext(opcontext); > > > > > > Modified: > > > > > > webservices/sandesha/trunk/java/src/org/apache/sandesha2/util/AcknowledgementManager. > > > java > > > URL: http://svn.apache . > > > > > > org/viewvc/webservices/sandesha/trunk/java/src/org/apache/sandesha2/util/AcknowledgementManager. > > > java?view=diff&rev=507097&r1=507096&r2=507097 > > > > > > ============================================================================== > > > --- > > > > > > webservices/sandesha/trunk/java/src/org/apache/sandesha2/util/AcknowledgementManager. > > > java (original) > > > +++ > > > > > > webservices/sandesha/trunk/java/src/org/apache/sandesha2/util/AcknowledgementManager. > > > java Tue Feb 13 08:58:14 2007 > > > @@ -31,6 +31,7 @@ > > > import org.apache.axis2.Constants; > > > import org.apache.axis2.addressing.EndpointReference; > > > import org.apache.axis2.context.ConfigurationContext; > > > +import org.apache.axis2.context.ContextFactory ; > > > import org.apache.axis2.context.MessageContext ; > > > import org.apache.axis2.context.OperationContext; > > > import org.apache.axis2.context.ServiceContext; > > > @@ -354,8 +355,9 @@ > > > // operation context will be null when doing in a GLOBAL > > > // handler. > > > AxisOperation op = ackMsgContext.getAxisOperation(); > > > + > > > ServiceContext serviceCtx = > ackMsgContext.getServiceContext(); > > > - OperationContext opCtx = new OperationContext(op, > serviceCtx); > > > + OperationContext opCtx = ContextFactory. > > > createOperationContext(op, ackRMMsgContext.getMessageContext(). > > > getServiceContext()); > > > ackRMMsgContext.getMessageContext().setOperationContext(opCtx); > > > } > > > > > > > > > Modified: > > > > > > webservices/sandesha/trunk/java/src/org/apache/sandesha2/workers/SenderWorker. > > > java > > > URL: http://svn.apache. > > > > > > org/viewvc/webservices/sandesha/trunk/java/src/org/apache/sandesha2/workers/SenderWorker. > > > java?view=diff&rev=507097&r1=507096&r2=507097 > > > > > > ============================================================================== > > > --- > > > > > > webservices/sandesha/trunk/java/src/org/apache/sandesha2/workers/SenderWorker. > > > java (original) > > > +++ > > > > > > webservices/sandesha/trunk/java/src/org/apache/sandesha2/workers/SenderWorker. > > > java Tue Feb 13 08:58:14 2007 > > > @@ -11,6 +11,7 @@ > > > import org.apache.axis2.addressing.AddressingConstants; > > > import org.apache.axis2.addressing.EndpointReference; > > > import org.apache.axis2.context.ConfigurationContext ; > > > +import org.apache.axis2.context.ContextFactory; > > > import org.apache.axis2.context.MessageContext; > > > import org.apache.axis2.context.OperationContext; > > > import org.apache.axis2.context.ServiceContext ; > > > @@ -522,9 +523,11 @@ > > > OperationContext responseMsgOpCtx = requestMsgOpCtx; > > > if (requestMsgOpCtx.getAxisOperation(). > > > getMessageReceiver() == null) { > > > // Generate a new RM In Only operation > > > + > > > ServiceContext serviceCtx = > > > responseMessageContext.getServiceContext(); > > > AxisOperation op = msgCtx.getAxisService(). > > > getOperation(new QName("RMInOnlyOperation")); > > > - responseMsgOpCtx = new OperationContext(op, > > > serviceCtx); > > > + responseMsgOpCtx = ContextFactory. > > > createOperationContext (op, serviceCtx); > > > + > > > } > > > > > > responseMessageContext.setOperationContext(responseMsgOpCtx); > > > > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > > > > > > Unless stated otherwise above: > > IBM United Kingdom Limited - Registered in England and Wales with number > > 741598. > > Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 > 3AU > > > > > > > > > > > > > > > > > Unless stated otherwise above: > IBM United Kingdom Limited - Registered in England and Wales with number > 741598. > Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU > > > > Unless stated otherwise above: IBM United Kingdom Limited - Registered in England and Wales with number 741598. Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
