Hi,
I'm using a vfs proxy to process xml files.
Vfs has the nice feature that on an error, the files are moved to an error
location.
Depending on the result of a callout mediator I want to decide whether the
vfs should fault or not. How can I make a sequence fault ?
I tried the fault and drop mediators, but they don't seem to do the job.
I hande the callout response in a <switch> and want to let the <default>
clause case an error, so that the vfs knows it has to move the file to the
error folder.
Any Ideas ?
synapse.xml snippets:
<syn:callout serviceURL="
http://localhost:8080/UM/services/userManagement">
<syn:source xmlns:ns2="http://org.apache.synapse/xsd"
xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope" xmlns:ns="
http://org.apache.synapse/xsd" xmlns:s11="
http://schemas.xmlsoap.org/soap/envelope/" xpath="s11:Body/foo"/>
<syn:target xmlns:ns2="http://org.apache.synapse/xsd"
xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope" xmlns:ns="
http://org.apache.synapse/xsd" xmlns:s11="
http://schemas.xmlsoap.org/soap/envelope/" xpath="s11:Body/:fooResponse"/>
</syn:callout>
<syn:switch xmlns:ns2="http://org.apache.synapse/xsd" xmlns:soapenv="
http://www.w3.org/2003/05/soap-envelope" xmlns:ns="
http://org.apache.synapse/xsd" source="//foo/return/resultCode">
<syn:case regex="0"/>
<!-- OK -->
<syn:case regex="-502"/>
<!-- some other OK -->
<syn:default>
<syn:log level="custom">
<syn:property name="description" value="ERROR: Invalid
response from foo, Faulting"/>
<syn:property name="resultCode"
expression="//nsi:foo/return/resultCode"/>
</syn:log>
<!-- here i want the sequence to fault -->
<syn:drop/>
</syn:default>
</syn:switch>
Any ideas ?
Regards,
Harm
_______________________________________________
Esb-java-user mailing list
[email protected]
https://wso2.org/cgi-bin/mailman/listinfo/esb-java-user