Hi All,

I have a simple local-entry file, where I can store 2 inputs as an XML and
depending on the input I can parse that XML to route to one condition or
the other.

Below are the 2 input I can insert in same local-entry file:-

*Input 1:-*
<localEntry key="LocalEntryFile" xmlns="http://ws.apache.org/ns/synapse";>
    <list>
             <A>value</A>
<B>value</B>
<C>value</C>
<D>value</D>
<E>value</E>
<F>value</F>
    </list>
</localEntry>

*Input 2:-  *
<localEntry key="LocalEntryFile" xmlns="http://ws.apache.org/ns/synapse";>
    <list>
           <A>value</A>
<B>value</B>
<C>value</C>
    </list>
</localEntry>

I am routing using filter mediator as below depending on the input I use in
my local-entry file, my filter condition is:-
<property
expression="get-property('registry','conf:/CollectionTest/LocalEntryFile.xml')"
name="EntryFile" scope="default" type="OM"/>
<filter regex="true" source="boolean($ctx:EntryFile//*[local-name()='A'])
and boolean($ctx:EntryFile//*[local-name()='B']) and
boolean($ctx:EntryFile//*[local-name()='C']) and
boolean($ctx:EntryFile//*[local-name()='D']) and
boolean($ctx:EntryFile//*[local-name()='E']) and
boolean($ctx:EntryFile//*[local-name()='F'])">
                <then>
                    <log level="custom">
                        <property name="FirstLogProperty"
value="==========================FIRST"/>
                    </log>
                </then>
                <else>
                    <log level="custom">
                        <property name="SecondLogProperty"
value="==========================SECOND"/>
                    </log>
                </else>
            </filter>

But what I want is suppose I inserted both input in Local entry as below :-
<localEntry key="LocalEntryFile" xmlns="http://ws.apache.org/ns/synapse";>
    <list>
<Input1>
           <A>value</A>
<B>value</B>
<C>value</C>
<D>value</D>
<E>value</E>
<F>value</F>
</Input1>
<Input2>
<A>value</A>
<B>value</B>
<C>value</C>
</Input2>
    </list>
</localEntry>

Then I want it to execute for both. How can I achieve this? Help would be
appreciated.

Thank you,
Aman.
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to