You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@synapse.apache.org by Amila Suriarachchi <am...@gmail.com> on 2009/05/12 17:57:57 UTC

Supporting WS RM 1.1 for synapse.

hi,

Currently nhttp worker (ServerWorker.java 206) has the following logic

if (msgContext != null &&
            msgContext.getOperationContext() != null &&

!msgContext.getOperationContext().getAxisOperation().isControlOperation()))
{

       // send 202 accepted if other criterias also matched
}

This gives a problem with handling MakeConnection and
TerminateSequenceResponse message  send by the server to client.

For an example if their are no pending messages Sandesah2 sends a 202
accepted for a  MakeConnection request. This works with axis2 http
transport.

Both MakeConnection and TerminateSequence messages are mapped to RM specific
control messages.

Therefore even I set it to NhttpConstants.FORCE_SC_ACCEPTED it will not pass
the if condition since
msgContext.getOperationContext().getAxisOperation().isControlOperation() is
true.

Is it possible to change this logic as follows,

if (msgContext != null &&
            msgContext.getOperationContext() != null &&

(!msgContext.getOperationContext().getAxisOperation().isControlOperation()
||
             msgContext.isPropertyTrue(NhttpConstants.FORCE_SC_ACCEPTED))) {

       // send 202 accepted if other criterias also matched
}

I don't have much understanding about the synapse context. But I feel it is
reasonable to allow send
202 accepted header even it is a control operation, if the
NhttpConstants.FORCE_SC_ACCEPTED is set.

WDYT?

thanks,
Amila.


-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/

Re: Supporting WS RM 1.1 for synapse.

Posted by "Asankha C. Perera" <as...@apache.org>.
Hi Ruwan/Amila
> These control operations that the synapse transport is referring to is 
> mostly RM related control messages, so as far as RM works without an 
> issue, I am OK with this change.
>
> Asankha WDYT?
Sorry, I have been busy with some stuff lately.. If the only change 
required is the couple of lines Amila mentioned, I am ok with this

thanks
asankha
>
>
>     Currently nhttp worker (ServerWorker.java 206) has the following
>     logic
>
>     if (msgContext != null &&
>                 msgContext.getOperationContext() != null &&
>                
>     !msgContext.getOperationContext().getAxisOperation().isControlOperation()))
>     {
>
>            // send 202 accepted if other criterias also matched
>     }
>
>     ....
>     Is it possible to change this logic as follows,
>
>     if (msgContext != null &&
>                 msgContext.getOperationContext() != null &&
>                
>     (!msgContext.getOperationContext().getAxisOperation().isControlOperation()
>     ||
>                 
>     msgContext.isPropertyTrue(NhttpConstants.FORCE_SC_ACCEPTED))) {
>
>            // send 202 accepted if other criterias also matched
>     }
>
-- 
Asankha C. Perera
AdroitLogic, http://adroitlogic.org

http://esbmagic.blogspot.com





Re: Supporting WS RM 1.1 for synapse.

Posted by Ruwan Linton <ru...@gmail.com>.
These control operations that the synapse transport is referring to is
mostly RM related control messages, so as far as RM works without an issue,
I am OK with this change.

Asankha WDYT?

Thanks,
Ruwan

On Tue, May 12, 2009 at 9:27 PM, Amila Suriarachchi <
amilasuriarachchi@gmail.com> wrote:

> hi,
>
> Currently nhttp worker (ServerWorker.java 206) has the following logic
>
> if (msgContext != null &&
>             msgContext.getOperationContext() != null &&
>
> !msgContext.getOperationContext().getAxisOperation().isControlOperation()))
> {
>
>        // send 202 accepted if other criterias also matched
> }
>
> This gives a problem with handling MakeConnection and
> TerminateSequenceResponse message  send by the server to client.
>
> For an example if their are no pending messages Sandesah2 sends a 202
> accepted for a  MakeConnection request. This works with axis2 http
> transport.
>
> Both MakeConnection and TerminateSequence messages are mapped to RM
> specific control messages.
>
> Therefore even I set it to NhttpConstants.FORCE_SC_ACCEPTED it will not
> pass the if condition since
> msgContext.getOperationContext().getAxisOperation().isControlOperation() is
> true.
>
> Is it possible to change this logic as follows,
>
> if (msgContext != null &&
>             msgContext.getOperationContext() != null &&
>
> (!msgContext.getOperationContext().getAxisOperation().isControlOperation()
> ||
>              msgContext.isPropertyTrue(NhttpConstants.FORCE_SC_ACCEPTED)))
> {
>
>        // send 202 accepted if other criterias also matched
> }
>
> I don't have much understanding about the synapse context. But I feel it is
> reasonable to allow send
> 202 accepted header even it is a control operation, if the
> NhttpConstants.FORCE_SC_ACCEPTED is set.
>
> WDYT?
>
> thanks,
> Amila.
>
>
> --
> Amila Suriarachchi
> WSO2 Inc.
> blog: http://amilachinthaka.blogspot.com/
>



-- 
Ruwan Linton
Senior Software Engineer & Product Manager; WSO2 ESB; http://wso2.org/esb
WSO2 Inc.; http://wso2.org
email: ruwan@wso2.com; cell: +94 77 341 3097
blog: http://ruwansblog.blogspot.com