You can use the filter and send mediators to accomplish this. http://synapse.apache.org/Synapse_Configuration_Language.html#filter http://synapse.apache.org/Synapse_Configuration_Language.html#send
Synapse defines the header variable to get at the SOAP header with xpath. http://synapse.apache.org/Synapse_Configuration_Language.html#property Here is a sample. <?xml version="1.0"?> <definitions xmlns="http://ws.apache.org/ns/synapse"> <in> <filter xpath="$header/foo"> <send> <endpoint> <address uri="http://foo" /> </endpoint> </send> <filter </in> </definitions> You should check out the samples 1 and 2. http://synapse.apache.org/Synapse_Samples.html#Sample1 http://synapse.apache.org/Synapse_Samples.html#Sample2 Good luck! -----Original Message----- From: Massimo Cancellara [mailto:[email protected]] Sent: Wednesday, December 02, 2009 6:23 AM To: [email protected] Subject: Select endpoint based on header information Hi, I'm new to Synapse and I'm trying to understand if it can fit my scenario. Is it possible for a mediator to set the endpoint basing on informations in an ad-hoc header? If yes, how (just a suggestion on where to look at) Thanks, regards Massimo
