Discussion:
error handling in schema validation filter
Bill Malone
2012-01-27 19:23:46 UTC
Permalink
I am wanting to perform a schema validation in my mule flow. Upon failure, I would like to return a reply message to my caller with information on why the schema validation failed.

I have attempted to accomplish this through use of the mxml:schema-validation-filter with a custom Error Handler implementation. No matter what I try to do I cannot seem to get my Handler to fire. Seems that the schema-validation-filter just terminates processing the message and returns a blank reply. I'm thinking I would like to trigger a custom exception strategy and build up a soap reply.

Am I missing somethign obvious here, or is there a better way to accomplish what I mented above?

- WTM

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email
Pablo La Greca
2012-01-30 20:53:05 UTC
Permalink
Hi,

Exception strategy is being invoked or not? You can put a logger in the exception strategy and check if is executed.

Returning a custom message in an exception strategy is not straightforward. That's something we are tackling for Mule 3.3.

Please provide your custom exception strategy implementation so I can help you with it.

Pablo.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email
Bill Malone
2012-01-31 17:56:38 UTC
Permalink
My exception strategy was not getting invoked.. Nonetheless, I reached out through opening a case and got my question answered/issue resolved.

It was as simple as wrapping the <schema-validation-filter/> with a <message-filter> with throwOnUnaccepted="true" -

<message-filter throwOnUnaccepted="true" >
<filter ref="validateXml"/>
</message-filter>

As far as the exception strategy goes, I had no trouble getting that to fire. The issue I had was getting schema-validation-filter to throw an exception upon validation...

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email
giveway
2012-02-12 18:10:34 UTC
Permalink
Hello

Looking at problem with CXF and exception strategies (http://www.mulesoft.org/jira/browse/MULE-6003)...

do you know another configuration for custom-strategy be invoked ?? I've a flow with a transformer in which methods throw an Exception. I couldnt handle my Exception yet

Thanks

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Loading...