Chinthaka

The specific role "next" means that in the case you outline, Synapse must fault.

the roles defined by SOAP are:

next    "http://www.w3.org/2003/05/soap-envelope/role/next";   
Each SOAP intermediary and the ultimate SOAP receiver MUST act in this role.

none    "http://www.w3.org/2003/05/soap-envelope/role/none";   
SOAP nodes MUST NOT act in this role.

ultimateReceiver
        "http://www.w3.org/2003/05/soap-envelope/role/ultimateReceiver";
The ultimate receiver MUST act in this role.

[see http://www.w3.org/TR/soap12-part1/#soaproles]

As Sanjiva points out, if there is no role defined, then only the
ultimate receiver needs to understand that.

So we need Axis2 to be configurable to say which role an engine or
module is implementing. Then Synapse can only have to process the
mustUnderstands targeted at the role it is playing.

Paul

On 7/13/06, Eran Chinthaka <[EMAIL PROTECTED]> wrote:
Paul Fremantle wrote:
> I don't know enough about the mustUnderstand handling in Axis2, but it
> seems to me that we might also want to identify a Synapse instance as
> a given role.
>
> In other words, if we are acting as an intermediary, we may be
> implementing a specific role, and not the "ultimate receiver". So we
> only need to understand the headers that are targeted at our role or
> the "next" role.

Well I don't think Synapse can understand all the headers which has the
Role next.
Take this example. A sends a message to B and this message is mediated
by Synapse (S). If A doesn't know about S, then he sends some headers,
marked as mustUnderstand=true thinking B will understand them all.

A ------ (S) ----- B

But if S intercept this message and if S can not understand it, then
Synapse engine is in trouble.

So there are two basic solutions to this problem.

1. To hack Axis2 itself to bypass mustUnderstand processing. This is
very bad, IMO. Axis2 is a SOAP processor and it MUST adhere to the
basics of SOAP.

2. As Saminda suggested, mark all the headers as processed. This is how
mustUnderstand processing work in Axis2. If a handler can understand a
header, then it should set a header as processed. At the end of the
chain, Axis2 engine gets all the headers which mustUnderstand=true, and
checks whether all of them have the processed flag set. If even one
fails its a mustUnderstand check error (See AxisEngine.java:80)
So what Synapse can do is set all the headers as processed, before Axis2
engine does the mustUnderstand checking.

I think thats what Saminda had proposed and I also +1 that.

-- Chinthaka






--
Paul Fremantle
VP/Technology, WSO2 and OASIS WS-RX TC Co-chair

http://bloglines.com/blog/paulfremantle
[EMAIL PROTECTED]

"Oxygenating the Web Service Platform", www.wso2.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to