Hi Thankx a lot for the suggestion.This is really helpful. I have one more concern the input string i wants to send is my input request and the value that i wants in return will decide the endpoint configuration.But the request that needs to be forwarded should not change.
So how will i send the input request to using POJO. and at the same time how to ensure that same request si getting forwarded and its not changing in the due course. Regards, Abhishek Th Asankha C. Perera wrote: > > Hi >> I have my request coming into the Synapse.XML as a string.Now i want to >> retieve the value of a particular node and on the basis of this value I >> want >> to forward my request to two different URL"S. >> Can i write a java class which takes my string as input and returns the >> required value as output. > Yes. One option is to write a POJO which would contain a setter method > to accept the String parameter, and a getter to return the value > required. The execute() method, could then use the String and perform > whats required to generate the output. See [1] > > You could also use a Class mediator - but this requires your code to be > compiled against the synapse core JAR, and would then receive a Synapse > MessageContext [2], from which you need to extract the String you > require, and possibly set a property with the result, so that you could > subsequently call the get-property() function to retrieve it for your > switch statement > >> If so how to merge the given value with the switch statement. >> OR i should use x path queries ? >> > I think a pojo/class mediator is the most suitable for this scenario.. > > cheers > asankha > > [1] > http://synapse.apache.org/Synapse_Configuration_Language.html#pojoCommand > [2] http://synapse.apache.org/Synapse_Extending.html > > -- > Asankha C. Perera > http://adroitlogic.org > > http://esbmagic.blogspot.com > > > -- View this message in context: http://www.nabble.com/Invoking-Synapse-from-Non-Axis-2-Client-tp21970007p22051192.html Sent from the Synapse - User mailing list archive at Nabble.com.
