Hi,

I am not sure I understand your question correctly, but I would try to respond.  I am by no means a Synapse expert, but afaik Synapse does not allow you to do this out of the box today, but imho it is possible.  You would have to write your own custom mediator though.

You need to pass some information such as a <sequence> mediator configuration in your soap header.  The SynapseMediator would be instantiated with your custom mediator which needs to do the following _runtime_ (during mediate()):
1. Read the soap envelope and extract the relevant routing information from the header.
2. Call on the appropriate MediatorFactory to build a mediator as specified in the header (you can pool such mediators of course if the rules are not too dynamic to save resources).
3. Invoke down on the dynamically created mediator.

The information in the header doesn't necessarily need to be synapse configuration, but then you'd have to build your mediators programatically.

Is this what you want to do or just my misunderstanding?

Regards
Hadrian


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




Reply via email to