Hi

Interesting question.

How about:

<filter source="get-property('to')" regex="http://my_specific_url";>
  <sequence>
      ... specific order of mediators here...
  </sequence>
</filter>

This checks if the incoming target (the TO address) matches
http://my_specific_url.
If it does then it will execute the sequence of mediators in the order
you specify.

So as long as you have mediators to log, sign and encrypt, you can
specify that order there.
The filter is efficient but not for large numbers of filters, because
it will test each one,
so to do this efficiently for a bunch of different URIs/URLs you can
use the switch, which only matches one
URI out of a bunch:

<switch source="get-property('to')" >
 <case regex="http://my_specific_url1";>
    <sequence>
       ... specific order of mediators here...
    </sequence>
 </case>
 <case regex="http://anotherURI";>
    <sequence>
      ...
    </sequence>
 </case>
</switch>

I think that does *exactly* what you want today.

You can actually do something like this with Axis2, but the Axis2
design is actually there to figure out the order of handlers
based on the "standard" pattern, so you would have to bypass that and
use the services.xml to completely specify the handler order.

Paul

On 6/29/06, Frederik Juchart <[EMAIL PROTECTED]> wrote:
Hi,

I'm currently working on my diploma thesis "developing a routing mechanism for
soap messages". In addition to "simply" routing the message from one node to
another I have to dynamically (depending on the routing) define the sequence in
which soap headers are processed.

Example: someone sends a soap message and wants that message to be routed to a
logging service, a signature service and an encryption service in exactly that
order. These services are addressed via distinct soap headers. There wouldn't
be a problem if each soap node could only understand one of those headers... 
but...
If one soap node was able to process all of those headers I would have to make
sure that the headers are executed in the correct order.

I know that the soap standard does not define a sequence on headers, but it
says "The processing of one or more SOAP header blocks MAY control or determine
the order of processing for other SOAP header blocks and/or the SOAP body. For
example, one could create a SOAP header block to force processing of other SOAP
header blocks in lexical order." - which is what I want to do, though I wont
use lexical order, of course ;)

I am currently trying to implement a mechanism to define the processing
sequence of soap headers.
As I want the routing/sequence of headers to be defined within the message (as
a soap header) I would have to be able to change the sequence of header
processing in synapse while processing the "routing" header _at runtime_ ...

Is it possible to change the sequence of header processing ONLY for the current
message? If so... could you give me a hint on where to look?
Or do I have to do it differently?
Or is this impossible with synapse? *yikes*

Sorry for bothering you with my question but I did not know where else to 
look...


Thank you very much in advance,


Frederik Juchart






--
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