You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2009/04/16 18:21:32 UTC

[jira] Created: (CAMEL-1537) Predicate for validation

Predicate for validation 
-------------------------

                 Key: CAMEL-1537
                 URL: https://issues.apache.org/activemq/browse/CAMEL-1537
             Project: Apache Camel
          Issue Type: New Feature
    Affects Versions: 2.0-M1
            Reporter: Claus Ibsen
             Fix For: 2.1.0


The current validator is a component and its a bit clumsy as it throws an exception if validation error.

So if we have a nice Predicate for it, it can be like a xpath predicate or the likes.


[17:58]  <jstrachan> http://camel.apache.org/validation.html
[17:58]  <ulhasb> jstrachan: thanks for the quick responses
[17:59]  <cibsen> jstrachan we should maybe have a predicate for schema validation
[17:59]  <cibsen> then you can route it a bit more nice without try .. catch
[18:00]  * fbolton has quit ("Leaving.")
[18:03]  * gertv has quit (Client closed connection)
[18:05]  <jstrachan> cibsen: yeah
[18:05]  <jstrachan> cibsen: maybe a kinda predicate language using the other validators? filter().validate(theValidationEndpointUri).to("blah")

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-1537) Predicate for validation

Posted by "Christian Mueller (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1537?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=59255#action_59255 ] 

Christian Mueller commented on CAMEL-1537:
------------------------------------------

Hello Claus!
Sorry for the late reply, but I was busy with another issue ([FELIX-2280|https://issues.apache.org/jira/browse/FELIX-2280])...

> If the validate DSL just leverages an org.apache.camel.Expression  then we can hook in all kind of shit to be validated. 
Does this mean you dislike the proposal? May be this is more what you have in mind?
{code}
from("direct:start")
  .validate(body(String.class)).regex("^\\d{2}\\.\\d{2}\\.\\d{4}$")
.to("mock:result");
{code}

> Then as the examples shown above, its just a matter of adding fluent builders for that in Java DSL. And have some way of doing it in Spring XML as well. 
Do you have another solution in mind? Please give me a hint, in which direction this development should go...

Regards,
Christian

> Predicate for validation 
> -------------------------
>
>                 Key: CAMEL-1537
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1537
>             Project: Apache Camel
>          Issue Type: New Feature
>    Affects Versions: 2.0-M1
>            Reporter: Claus Ibsen
>            Assignee: Christian Mueller
>            Priority: Minor
>             Fix For: Future
>
>
> The current validator is a component and its a bit clumsy as it throws an exception if validation error.
> So if we have a nice Predicate for it, it can be like a xpath predicate or the likes.
> [17:58]  <jstrachan> http://camel.apache.org/validation.html
> [17:58]  <ulhasb> jstrachan: thanks for the quick responses
> [17:59]  <cibsen> jstrachan we should maybe have a predicate for schema validation
> [17:59]  <cibsen> then you can route it a bit more nice without try .. catch
> [18:00]  * fbolton has quit ("Leaving.")
> [18:03]  * gertv has quit (Client closed connection)
> [18:05]  <jstrachan> cibsen: yeah
> [18:05]  <jstrachan> cibsen: maybe a kinda predicate language using the other validators? filter().validate(theValidationEndpointUri).to("blah")

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-1537) Predicate for validation

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1537?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=59272#action_59272 ] 

Claus Ibsen commented on CAMEL-1537:
------------------------------------

No your proposal is fine. Its in line what I have in mind as well.

> Predicate for validation 
> -------------------------
>
>                 Key: CAMEL-1537
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1537
>             Project: Apache Camel
>          Issue Type: New Feature
>    Affects Versions: 2.0-M1
>            Reporter: Claus Ibsen
>            Assignee: Christian Mueller
>            Priority: Minor
>             Fix For: Future
>
>
> The current validator is a component and its a bit clumsy as it throws an exception if validation error.
> So if we have a nice Predicate for it, it can be like a xpath predicate or the likes.
> [17:58]  <jstrachan> http://camel.apache.org/validation.html
> [17:58]  <ulhasb> jstrachan: thanks for the quick responses
> [17:59]  <cibsen> jstrachan we should maybe have a predicate for schema validation
> [17:59]  <cibsen> then you can route it a bit more nice without try .. catch
> [18:00]  * fbolton has quit ("Leaving.")
> [18:03]  * gertv has quit (Client closed connection)
> [18:05]  <jstrachan> cibsen: yeah
> [18:05]  <jstrachan> cibsen: maybe a kinda predicate language using the other validators? filter().validate(theValidationEndpointUri).to("blah")

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-1537) Predicate for validation

Posted by "Christian Mueller (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1537?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=59471#action_59471 ] 

Christian Mueller commented on CAMEL-1537:
------------------------------------------

Thank you Willem and Claus,

and sorry for the confusion. I would only a feedback, whether or not I'm on the right way... :-)
I will have a look on the modified code and work on the bean and xml schema validation feature. I will also update the documentation in the next days.

I still learning how the Camel processor, predicate, expression, definition, ... staff works. I think I need some more hours for that.
I prefer to work next on the bean validation. I have the following DSL in my mind:

{code}
from("direct:start")
  .validate(body()).group("javax.validation.groups.Default")
.to("mock:result");
{code}

I'm not happy with "group", but I have no better idea. Alternatives I thought about are "jsr303" or "bean"...
I'm also not sure, whether or not 

{code}
from("direct:start")
  .validate(body()).group(class("javax.validation.groups.Default"))
.to("mock:result");
{code}

is better. Please guide my.

Thanks,
Christian

> Predicate for validation 
> -------------------------
>
>                 Key: CAMEL-1537
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1537
>             Project: Apache Camel
>          Issue Type: New Feature
>          Components: camel-core
>    Affects Versions: 2.0-M1
>            Reporter: Claus Ibsen
>            Assignee: Christian Mueller
>            Priority: Minor
>             Fix For: 2.4.0
>
>         Attachments: CAMEL-1537.patch
>
>
> The current validator is a component and its a bit clumsy as it throws an exception if validation error.
> So if we have a nice Predicate for it, it can be like a xpath predicate or the likes.
> [17:58]  <jstrachan> http://camel.apache.org/validation.html
> [17:58]  <ulhasb> jstrachan: thanks for the quick responses
> [17:59]  <cibsen> jstrachan we should maybe have a predicate for schema validation
> [17:59]  <cibsen> then you can route it a bit more nice without try .. catch
> [18:00]  * fbolton has quit ("Leaving.")
> [18:03]  * gertv has quit (Client closed connection)
> [18:05]  <jstrachan> cibsen: yeah
> [18:05]  <jstrachan> cibsen: maybe a kinda predicate language using the other validators? filter().validate(theValidationEndpointUri).to("blah")

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CAMEL-1537) Predicate for validation

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-1537?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen updated CAMEL-1537:
-------------------------------

    Fix Version/s: 2.4.0
                       (was: Future)
      Component/s: camel-core

> Predicate for validation 
> -------------------------
>
>                 Key: CAMEL-1537
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1537
>             Project: Apache Camel
>          Issue Type: New Feature
>          Components: camel-core
>    Affects Versions: 2.0-M1
>            Reporter: Claus Ibsen
>            Assignee: Christian Mueller
>            Priority: Minor
>             Fix For: 2.4.0
>
>         Attachments: CAMEL-1537.patch
>
>
> The current validator is a component and its a bit clumsy as it throws an exception if validation error.
> So if we have a nice Predicate for it, it can be like a xpath predicate or the likes.
> [17:58]  <jstrachan> http://camel.apache.org/validation.html
> [17:58]  <ulhasb> jstrachan: thanks for the quick responses
> [17:59]  <cibsen> jstrachan we should maybe have a predicate for schema validation
> [17:59]  <cibsen> then you can route it a bit more nice without try .. catch
> [18:00]  * fbolton has quit ("Leaving.")
> [18:03]  * gertv has quit (Client closed connection)
> [18:05]  <jstrachan> cibsen: yeah
> [18:05]  <jstrachan> cibsen: maybe a kinda predicate language using the other validators? filter().validate(theValidationEndpointUri).to("blah")

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-1537) Predicate for validation

Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1537?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=59501#action_59501 ] 

Willem Jiang commented on CAMEL-1537:
-------------------------------------

The Camel EL is powerful, I committed a patch which tests the spring regex Validate.
{code}
<camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
        <route>
            <from uri="direct:start"/>
            <validate>
                <simple>${bodyAs(java.lang.String)} regex '^\d{2}\.\d{2}\.\d{4}$'</simple>            	
            </validate>
            <to uri="mock:result"/>
        </route>
 </camelContext>
{code}

> Predicate for validation 
> -------------------------
>
>                 Key: CAMEL-1537
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1537
>             Project: Apache Camel
>          Issue Type: New Feature
>          Components: camel-core
>    Affects Versions: 2.0-M1
>            Reporter: Claus Ibsen
>            Assignee: Christian Mueller
>            Priority: Minor
>             Fix For: 2.4.0
>
>         Attachments: CAMEL-1537.patch
>
>
> The current validator is a component and its a bit clumsy as it throws an exception if validation error.
> So if we have a nice Predicate for it, it can be like a xpath predicate or the likes.
> [17:58]  <jstrachan> http://camel.apache.org/validation.html
> [17:58]  <ulhasb> jstrachan: thanks for the quick responses
> [17:59]  <cibsen> jstrachan we should maybe have a predicate for schema validation
> [17:59]  <cibsen> then you can route it a bit more nice without try .. catch
> [18:00]  * fbolton has quit ("Leaving.")
> [18:03]  * gertv has quit (Client closed connection)
> [18:05]  <jstrachan> cibsen: yeah
> [18:05]  <jstrachan> cibsen: maybe a kinda predicate language using the other validators? filter().validate(theValidationEndpointUri).to("blah")

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-1537) Predicate for validation

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1537?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=59465#action_59465 ] 

Claus Ibsen commented on CAMEL-1537:
------------------------------------

Sorry that ExpressionNodeDefinition was actually {{ExpressionSubElementDefinition}} and you use those when you need additional expressions in an EIP.
For example Aggregator which uses expressions for its completion conditions.

The validator is very simple so it can do as it does extend ExpressionNode and we are all set.

> Predicate for validation 
> -------------------------
>
>                 Key: CAMEL-1537
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1537
>             Project: Apache Camel
>          Issue Type: New Feature
>    Affects Versions: 2.0-M1
>            Reporter: Claus Ibsen
>            Assignee: Christian Mueller
>            Priority: Minor
>             Fix For: Future
>
>         Attachments: CAMEL-1537.patch
>
>
> The current validator is a component and its a bit clumsy as it throws an exception if validation error.
> So if we have a nice Predicate for it, it can be like a xpath predicate or the likes.
> [17:58]  <jstrachan> http://camel.apache.org/validation.html
> [17:58]  <ulhasb> jstrachan: thanks for the quick responses
> [17:59]  <cibsen> jstrachan we should maybe have a predicate for schema validation
> [17:59]  <cibsen> then you can route it a bit more nice without try .. catch
> [18:00]  * fbolton has quit ("Leaving.")
> [18:03]  * gertv has quit (Client closed connection)
> [18:05]  <jstrachan> cibsen: yeah
> [18:05]  <jstrachan> cibsen: maybe a kinda predicate language using the other validators? filter().validate(theValidationEndpointUri).to("blah")

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-1537) Predicate for validation

Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1537?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=59495#action_59495 ] 

Willem Jiang commented on CAMEL-1537:
-------------------------------------

Hi ,

The change of Claus made just let the validate take the expression which can be a predicate, and it make the ValidateDefinition easy to understand.
Now I have question about the supporting the define the regex predicate in XML, I don't find a way to do that with simple expression tag.
Do we have plan to support it ?

Willem


> Predicate for validation 
> -------------------------
>
>                 Key: CAMEL-1537
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1537
>             Project: Apache Camel
>          Issue Type: New Feature
>          Components: camel-core
>    Affects Versions: 2.0-M1
>            Reporter: Claus Ibsen
>            Assignee: Christian Mueller
>            Priority: Minor
>             Fix For: 2.4.0
>
>         Attachments: CAMEL-1537.patch
>
>
> The current validator is a component and its a bit clumsy as it throws an exception if validation error.
> So if we have a nice Predicate for it, it can be like a xpath predicate or the likes.
> [17:58]  <jstrachan> http://camel.apache.org/validation.html
> [17:58]  <ulhasb> jstrachan: thanks for the quick responses
> [17:59]  <cibsen> jstrachan we should maybe have a predicate for schema validation
> [17:59]  <cibsen> then you can route it a bit more nice without try .. catch
> [18:00]  * fbolton has quit ("Leaving.")
> [18:03]  * gertv has quit (Client closed connection)
> [18:05]  <jstrachan> cibsen: yeah
> [18:05]  <jstrachan> cibsen: maybe a kinda predicate language using the other validators? filter().validate(theValidationEndpointUri).to("blah")

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-1537) Predicate for validation

Posted by "Christian Mueller (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1537?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=61362#action_61362 ] 

Christian Mueller commented on CAMEL-1537:
------------------------------------------

Hello Claus!

I let this issue open, because we also planed to integrate the predicate validation for:
- xml schema
- relaxNG
- JSR303 (bean validation)

Because of my current time constraints and my not sufficient knowledge in this (Camel) area, I didn't implement this until now. :-(

Should we open new issues for this or do we discard this improvement?

Regards,
Christian

> Predicate for validation 
> -------------------------
>
>                 Key: CAMEL-1537
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1537
>             Project: Apache Camel
>          Issue Type: New Feature
>          Components: camel-core
>    Affects Versions: 2.0-M1
>            Reporter: Claus Ibsen
>            Assignee: Christian Mueller
>            Priority: Minor
>             Fix For: 2.3.0
>
>         Attachments: CAMEL-1537.patch
>
>
> The current validator is a component and its a bit clumsy as it throws an exception if validation error.
> So if we have a nice Predicate for it, it can be like a xpath predicate or the likes.
> [17:58]  <jstrachan> http://camel.apache.org/validation.html
> [17:58]  <ulhasb> jstrachan: thanks for the quick responses
> [17:59]  <cibsen> jstrachan we should maybe have a predicate for schema validation
> [17:59]  <cibsen> then you can route it a bit more nice without try .. catch
> [18:00]  * fbolton has quit ("Leaving.")
> [18:03]  * gertv has quit (Client closed connection)
> [18:05]  <jstrachan> cibsen: yeah
> [18:05]  <jstrachan> cibsen: maybe a kinda predicate language using the other validators? filter().validate(theValidationEndpointUri).to("blah")

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Work started: (CAMEL-1537) Predicate for validation

Posted by "Christian Mueller (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-1537?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Work on CAMEL-1537 started by Christian Mueller.

> Predicate for validation 
> -------------------------
>
>                 Key: CAMEL-1537
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1537
>             Project: Apache Camel
>          Issue Type: New Feature
>    Affects Versions: 2.0-M1
>            Reporter: Claus Ibsen
>            Assignee: Christian Mueller
>            Priority: Minor
>             Fix For: Future
>
>
> The current validator is a component and its a bit clumsy as it throws an exception if validation error.
> So if we have a nice Predicate for it, it can be like a xpath predicate or the likes.
> [17:58]  <jstrachan> http://camel.apache.org/validation.html
> [17:58]  <ulhasb> jstrachan: thanks for the quick responses
> [17:59]  <cibsen> jstrachan we should maybe have a predicate for schema validation
> [17:59]  <cibsen> then you can route it a bit more nice without try .. catch
> [18:00]  * fbolton has quit ("Leaving.")
> [18:03]  * gertv has quit (Client closed connection)
> [18:05]  <jstrachan> cibsen: yeah
> [18:05]  <jstrachan> cibsen: maybe a kinda predicate language using the other validators? filter().validate(theValidationEndpointUri).to("blah")

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (CAMEL-1537) Predicate for validation

Posted by "Christian Mueller (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-1537?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christian Mueller reassigned CAMEL-1537:
----------------------------------------

    Assignee: Christian Mueller

> Predicate for validation 
> -------------------------
>
>                 Key: CAMEL-1537
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1537
>             Project: Apache Camel
>          Issue Type: New Feature
>    Affects Versions: 2.0-M1
>            Reporter: Claus Ibsen
>            Assignee: Christian Mueller
>            Priority: Minor
>             Fix For: Future
>
>
> The current validator is a component and its a bit clumsy as it throws an exception if validation error.
> So if we have a nice Predicate for it, it can be like a xpath predicate or the likes.
> [17:58]  <jstrachan> http://camel.apache.org/validation.html
> [17:58]  <ulhasb> jstrachan: thanks for the quick responses
> [17:59]  <cibsen> jstrachan we should maybe have a predicate for schema validation
> [17:59]  <cibsen> then you can route it a bit more nice without try .. catch
> [18:00]  * fbolton has quit ("Leaving.")
> [18:03]  * gertv has quit (Client closed connection)
> [18:05]  <jstrachan> cibsen: yeah
> [18:05]  <jstrachan> cibsen: maybe a kinda predicate language using the other validators? filter().validate(theValidationEndpointUri).to("blah")

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-1537) Predicate for validation

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1537?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=59066#action_59066 ] 

Claus Ibsen commented on CAMEL-1537:
------------------------------------

If the {{validate}} DSL just leverages an {{org.apache.camel.Expression}} then we can hook in all kind of _shit_ to be validated.

You just use {{PredicateBuilder.toPredicate}} to convert the {{Expression}} to a predicate which then returns {{true}} or {{false}}.
Then its just a matter of thrown {{ValidationException}} if the validation failed, predicate was false.

Then as the examples shown above, its just a matter of adding fluent builders for that in Java DSL. And have some way of doing it in Spring XML as well. 

> Predicate for validation 
> -------------------------
>
>                 Key: CAMEL-1537
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1537
>             Project: Apache Camel
>          Issue Type: New Feature
>    Affects Versions: 2.0-M1
>            Reporter: Claus Ibsen
>            Assignee: Christian Mueller
>            Priority: Minor
>             Fix For: Future
>
>
> The current validator is a component and its a bit clumsy as it throws an exception if validation error.
> So if we have a nice Predicate for it, it can be like a xpath predicate or the likes.
> [17:58]  <jstrachan> http://camel.apache.org/validation.html
> [17:58]  <ulhasb> jstrachan: thanks for the quick responses
> [17:59]  <cibsen> jstrachan we should maybe have a predicate for schema validation
> [17:59]  <cibsen> then you can route it a bit more nice without try .. catch
> [18:00]  * fbolton has quit ("Leaving.")
> [18:03]  * gertv has quit (Client closed connection)
> [18:05]  <jstrachan> cibsen: yeah
> [18:05]  <jstrachan> cibsen: maybe a kinda predicate language using the other validators? filter().validate(theValidationEndpointUri).to("blah")

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (CAMEL-1537) Predicate for validation

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-1537?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen resolved CAMEL-1537.
--------------------------------

    Fix Version/s: 2.3.0
                       (was: 2.5.0)
       Resolution: Fixed

This was already implement in Camel 2.3 afair

> Predicate for validation 
> -------------------------
>
>                 Key: CAMEL-1537
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1537
>             Project: Apache Camel
>          Issue Type: New Feature
>          Components: camel-core
>    Affects Versions: 2.0-M1
>            Reporter: Claus Ibsen
>            Assignee: Christian Mueller
>            Priority: Minor
>             Fix For: 2.3.0
>
>         Attachments: CAMEL-1537.patch
>
>
> The current validator is a component and its a bit clumsy as it throws an exception if validation error.
> So if we have a nice Predicate for it, it can be like a xpath predicate or the likes.
> [17:58]  <jstrachan> http://camel.apache.org/validation.html
> [17:58]  <ulhasb> jstrachan: thanks for the quick responses
> [17:59]  <cibsen> jstrachan we should maybe have a predicate for schema validation
> [17:59]  <cibsen> then you can route it a bit more nice without try .. catch
> [18:00]  * fbolton has quit ("Leaving.")
> [18:03]  * gertv has quit (Client closed connection)
> [18:05]  <jstrachan> cibsen: yeah
> [18:05]  <jstrachan> cibsen: maybe a kinda predicate language using the other validators? filter().validate(theValidationEndpointUri).to("blah")

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CAMEL-1537) Predicate for validation

Posted by "Christian Mueller (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-1537?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christian Mueller updated CAMEL-1537:
-------------------------------------

    Attachment: CAMEL-1537.patch

I spend some hous to understand the camel-core components. I have now finished the first of tree steps, implementing the validation DSL for regular expressions. I attached the patch and hope that someone could give me a feedback whether or not I'm on the right way. The unit test shows best what you can now do:

{code}
public class ValidateRegExpTest extends ContextTestSupport {
    
    private Endpoint startEndpoint;
    private MockEndpoint resultEndpoint;
    
    @Override
    protected void setUp() throws Exception {
        super.setUp();
        
        startEndpoint = resolveMandatoryEndpoint("direct:start", Endpoint.class);
        resultEndpoint = resolveMandatoryEndpoint("mock:result", MockEndpoint.class);
    }

    public void testSendMatchingMessage() throws Exception {
        resultEndpoint.expectedMessageCount(1);

        template.sendBody(startEndpoint, "01.01.2010");
        
        resultEndpoint.assertIsSatisfied();
    }

    public void testSendNotMatchingMessage() throws Exception {
        resultEndpoint.expectedMessageCount(0);

        try {
            template.sendBody(startEndpoint, "1.1.2010");
            fail("CamelExecutionException expected");
        } catch (CamelExecutionException e) {
            // expected
            assertTrue(e.getCause() instanceof RegExpValidationException);
            String message = ((RegExpValidationException) e.getCause()).getMessage();
            assertEquals("Validation failed for Predicate[{bodyAs[java.lang.String]}.matches('^\\d{2}\\.\\d{2}\\.\\d{4}$')]. Exchange[Message: 1.1.2010]", message);
        }

        resultEndpoint.assertIsSatisfied();
    }


    protected RouteBuilder createRouteBuilder() {
        return new RouteBuilder() {
            public void configure() {
                from("direct:start")
                .validate(body(String.class)).regex("^\\d{2}\\.\\d{2}\\.\\d{4}$")
                .to("mock:result");
            }
        };
    }
}
{code}

Thanks,
Christian

> Predicate for validation 
> -------------------------
>
>                 Key: CAMEL-1537
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1537
>             Project: Apache Camel
>          Issue Type: New Feature
>    Affects Versions: 2.0-M1
>            Reporter: Claus Ibsen
>            Assignee: Christian Mueller
>            Priority: Minor
>             Fix For: Future
>
>         Attachments: CAMEL-1537.patch
>
>
> The current validator is a component and its a bit clumsy as it throws an exception if validation error.
> So if we have a nice Predicate for it, it can be like a xpath predicate or the likes.
> [17:58]  <jstrachan> http://camel.apache.org/validation.html
> [17:58]  <ulhasb> jstrachan: thanks for the quick responses
> [17:59]  <cibsen> jstrachan we should maybe have a predicate for schema validation
> [17:59]  <cibsen> then you can route it a bit more nice without try .. catch
> [18:00]  * fbolton has quit ("Leaving.")
> [18:03]  * gertv has quit (Client closed connection)
> [18:05]  <jstrachan> cibsen: yeah
> [18:05]  <jstrachan> cibsen: maybe a kinda predicate language using the other validators? filter().validate(theValidationEndpointUri).to("blah")

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-1537) Predicate for validation

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1537?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=59463#action_59463 ] 

Claus Ibsen commented on CAMEL-1537:
------------------------------------

Willem you was a bit to fast there to commit the patch.

We already have the pieces in the core, and all was needed was just to add the validate in the DSL which hooks up with the Predicate/Expression concept of Camel.
And it can be integrated with XML by requiring an ExpressionNodeDefiniton (i think thats the name, but see eg. DelayDefinition).

Then that Expression is just evaluated as a Predicate and if its false an exception is thrown.

> Predicate for validation 
> -------------------------
>
>                 Key: CAMEL-1537
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1537
>             Project: Apache Camel
>          Issue Type: New Feature
>    Affects Versions: 2.0-M1
>            Reporter: Claus Ibsen
>            Assignee: Christian Mueller
>            Priority: Minor
>             Fix For: Future
>
>         Attachments: CAMEL-1537.patch
>
>
> The current validator is a component and its a bit clumsy as it throws an exception if validation error.
> So if we have a nice Predicate for it, it can be like a xpath predicate or the likes.
> [17:58]  <jstrachan> http://camel.apache.org/validation.html
> [17:58]  <ulhasb> jstrachan: thanks for the quick responses
> [17:59]  <cibsen> jstrachan we should maybe have a predicate for schema validation
> [17:59]  <cibsen> then you can route it a bit more nice without try .. catch
> [18:00]  * fbolton has quit ("Leaving.")
> [18:03]  * gertv has quit (Client closed connection)
> [18:05]  <jstrachan> cibsen: yeah
> [18:05]  <jstrachan> cibsen: maybe a kinda predicate language using the other validators? filter().validate(theValidationEndpointUri).to("blah")

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-1537) Predicate for validation

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1537?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=59464#action_59464 ] 

Claus Ibsen commented on CAMEL-1537:
------------------------------------

Its not as bad as first sight. I have polished the code a bit to make it as it should be.
And add some Spring XML examples also.

> Predicate for validation 
> -------------------------
>
>                 Key: CAMEL-1537
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1537
>             Project: Apache Camel
>          Issue Type: New Feature
>    Affects Versions: 2.0-M1
>            Reporter: Claus Ibsen
>            Assignee: Christian Mueller
>            Priority: Minor
>             Fix For: Future
>
>         Attachments: CAMEL-1537.patch
>
>
> The current validator is a component and its a bit clumsy as it throws an exception if validation error.
> So if we have a nice Predicate for it, it can be like a xpath predicate or the likes.
> [17:58]  <jstrachan> http://camel.apache.org/validation.html
> [17:58]  <ulhasb> jstrachan: thanks for the quick responses
> [17:59]  <cibsen> jstrachan we should maybe have a predicate for schema validation
> [17:59]  <cibsen> then you can route it a bit more nice without try .. catch
> [18:00]  * fbolton has quit ("Leaving.")
> [18:03]  * gertv has quit (Client closed connection)
> [18:05]  <jstrachan> cibsen: yeah
> [18:05]  <jstrachan> cibsen: maybe a kinda predicate language using the other validators? filter().validate(theValidationEndpointUri).to("blah")

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-1537) Predicate for validation

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1537?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=59496#action_59496 ] 

Claus Ibsen commented on CAMEL-1537:
------------------------------------

Spring XML is not a programming language and hence you need to use scripting language or the likes.

The Camel EL = Simple can also do some operations
http://camel.apache.org/simple.html

So you can do something like
{code:xml}
<validate>
   <simple>${body} regex [foo|bar]</simple>
</validate>
{code}

To let the body match against the regex.

> Predicate for validation 
> -------------------------
>
>                 Key: CAMEL-1537
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1537
>             Project: Apache Camel
>          Issue Type: New Feature
>          Components: camel-core
>    Affects Versions: 2.0-M1
>            Reporter: Claus Ibsen
>            Assignee: Christian Mueller
>            Priority: Minor
>             Fix For: 2.4.0
>
>         Attachments: CAMEL-1537.patch
>
>
> The current validator is a component and its a bit clumsy as it throws an exception if validation error.
> So if we have a nice Predicate for it, it can be like a xpath predicate or the likes.
> [17:58]  <jstrachan> http://camel.apache.org/validation.html
> [17:58]  <ulhasb> jstrachan: thanks for the quick responses
> [17:59]  <cibsen> jstrachan we should maybe have a predicate for schema validation
> [17:59]  <cibsen> then you can route it a bit more nice without try .. catch
> [18:00]  * fbolton has quit ("Leaving.")
> [18:03]  * gertv has quit (Client closed connection)
> [18:05]  <jstrachan> cibsen: yeah
> [18:05]  <jstrachan> cibsen: maybe a kinda predicate language using the other validators? filter().validate(theValidationEndpointUri).to("blah")

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-1537) Predicate for validation

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1537?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=59466#action_59466 ] 

Claus Ibsen commented on CAMEL-1537:
------------------------------------

trunk: 946538.

Polished the patch a bit and added tests for Spring XML.

We now need a documentation for this. It should be added to the list of EIPs.

> Predicate for validation 
> -------------------------
>
>                 Key: CAMEL-1537
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1537
>             Project: Apache Camel
>          Issue Type: New Feature
>          Components: camel-core
>    Affects Versions: 2.0-M1
>            Reporter: Claus Ibsen
>            Assignee: Christian Mueller
>            Priority: Minor
>             Fix For: 2.4.0
>
>         Attachments: CAMEL-1537.patch
>
>
> The current validator is a component and its a bit clumsy as it throws an exception if validation error.
> So if we have a nice Predicate for it, it can be like a xpath predicate or the likes.
> [17:58]  <jstrachan> http://camel.apache.org/validation.html
> [17:58]  <ulhasb> jstrachan: thanks for the quick responses
> [17:59]  <cibsen> jstrachan we should maybe have a predicate for schema validation
> [17:59]  <cibsen> then you can route it a bit more nice without try .. catch
> [18:00]  * fbolton has quit ("Leaving.")
> [18:03]  * gertv has quit (Client closed connection)
> [18:05]  <jstrachan> cibsen: yeah
> [18:05]  <jstrachan> cibsen: maybe a kinda predicate language using the other validators? filter().validate(theValidationEndpointUri).to("blah")

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-1537) Predicate for validation

Posted by "Christian Mueller (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1537?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=59551#action_59551 ] 

Christian Mueller commented on CAMEL-1537:
------------------------------------------

Claus, Willem,
I updated the wiki [EIP|https://cwiki.apache.org/confluence/display/CAMEL/EIP] page and added the 'Validate' EIP.
I also create the new [Validate|https://cwiki.apache.org/confluence/display/CAMEL/Validate] wiki page and updated the [2.3.0 Release Notes|https://cwiki.apache.org/confluence/display/CAMEL/Camel+2.3.0+Release].

It would be nice, if you could have a look on it.

Cheers,
Christian

> Predicate for validation 
> -------------------------
>
>                 Key: CAMEL-1537
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1537
>             Project: Apache Camel
>          Issue Type: New Feature
>          Components: camel-core
>    Affects Versions: 2.0-M1
>            Reporter: Claus Ibsen
>            Assignee: Christian Mueller
>            Priority: Minor
>             Fix For: 2.4.0
>
>         Attachments: CAMEL-1537.patch
>
>
> The current validator is a component and its a bit clumsy as it throws an exception if validation error.
> So if we have a nice Predicate for it, it can be like a xpath predicate or the likes.
> [17:58]  <jstrachan> http://camel.apache.org/validation.html
> [17:58]  <ulhasb> jstrachan: thanks for the quick responses
> [17:59]  <cibsen> jstrachan we should maybe have a predicate for schema validation
> [17:59]  <cibsen> then you can route it a bit more nice without try .. catch
> [18:00]  * fbolton has quit ("Leaving.")
> [18:03]  * gertv has quit (Client closed connection)
> [18:05]  <jstrachan> cibsen: yeah
> [18:05]  <jstrachan> cibsen: maybe a kinda predicate language using the other validators? filter().validate(theValidationEndpointUri).to("blah")

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CAMEL-1537) Predicate for validation

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-1537?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen updated CAMEL-1537:
-------------------------------

    Fix Version/s: 2.5.0
                       (was: 2.4.0)

> Predicate for validation 
> -------------------------
>
>                 Key: CAMEL-1537
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1537
>             Project: Apache Camel
>          Issue Type: New Feature
>          Components: camel-core
>    Affects Versions: 2.0-M1
>            Reporter: Claus Ibsen
>            Assignee: Christian Mueller
>            Priority: Minor
>             Fix For: 2.5.0
>
>         Attachments: CAMEL-1537.patch
>
>
> The current validator is a component and its a bit clumsy as it throws an exception if validation error.
> So if we have a nice Predicate for it, it can be like a xpath predicate or the likes.
> [17:58]  <jstrachan> http://camel.apache.org/validation.html
> [17:58]  <ulhasb> jstrachan: thanks for the quick responses
> [17:59]  <cibsen> jstrachan we should maybe have a predicate for schema validation
> [17:59]  <cibsen> then you can route it a bit more nice without try .. catch
> [18:00]  * fbolton has quit ("Leaving.")
> [18:03]  * gertv has quit (Client closed connection)
> [18:05]  <jstrachan> cibsen: yeah
> [18:05]  <jstrachan> cibsen: maybe a kinda predicate language using the other validators? filter().validate(theValidationEndpointUri).to("blah")

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-1537) Predicate for validation

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1537?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=59504#action_59504 ] 

Claus Ibsen commented on CAMEL-1537:
------------------------------------

You should be able to omit {{java.lang.}} for those objects.

So you can just do
{{bodyAs(String)}}

> Predicate for validation 
> -------------------------
>
>                 Key: CAMEL-1537
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1537
>             Project: Apache Camel
>          Issue Type: New Feature
>          Components: camel-core
>    Affects Versions: 2.0-M1
>            Reporter: Claus Ibsen
>            Assignee: Christian Mueller
>            Priority: Minor
>             Fix For: 2.4.0
>
>         Attachments: CAMEL-1537.patch
>
>
> The current validator is a component and its a bit clumsy as it throws an exception if validation error.
> So if we have a nice Predicate for it, it can be like a xpath predicate or the likes.
> [17:58]  <jstrachan> http://camel.apache.org/validation.html
> [17:58]  <ulhasb> jstrachan: thanks for the quick responses
> [17:59]  <cibsen> jstrachan we should maybe have a predicate for schema validation
> [17:59]  <cibsen> then you can route it a bit more nice without try .. catch
> [18:00]  * fbolton has quit ("Leaving.")
> [18:03]  * gertv has quit (Client closed connection)
> [18:05]  <jstrachan> cibsen: yeah
> [18:05]  <jstrachan> cibsen: maybe a kinda predicate language using the other validators? filter().validate(theValidationEndpointUri).to("blah")

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-1537) Predicate for validation

Posted by "Christian Mueller (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1537?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=59013#action_59013 ] 

Christian Mueller commented on CAMEL-1537:
------------------------------------------

Currently I'm studying the Predicates, ProcessorDefinition, ...

In my opinion, we could provide the validation functionality for:
- xml validation
- bean validation (JSR 303)
- regExp validation for csv, fixed length, ...

I start with the regExp validation, because it's similar to the filter and choice predicate and it's a good starting point for me to discover this part of Camel... :-)

Currently, I can write a route like this to validate against a regular expression:

{code}
from("direct:start")
  .validate(body(String.class).regex("^\\d{2}\\.\\d{2}\\.\\d{4}$"))
.to("mock:result");
{code}

To validate with the bean validation feature (JSR 303), I could imagine a route definition like this:

{code}
from("direct:start")
  .validate(body())
.to("mock:result");
{code}

or

{code}
from("direct:start")
  .validate(body()).group(Default.class)
.to("mock:result");
{code}

if you want to define the constraint group, which should be evaluated.

For the validation against an XML schema, I could imagine the following route definition:

{code}
from("direct:start")
  .validate(body()).resource(schema.xsd)
.to("mock:result");
{code}

What do you think?

> Predicate for validation 
> -------------------------
>
>                 Key: CAMEL-1537
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1537
>             Project: Apache Camel
>          Issue Type: New Feature
>    Affects Versions: 2.0-M1
>            Reporter: Claus Ibsen
>            Assignee: Christian Mueller
>            Priority: Minor
>             Fix For: Future
>
>
> The current validator is a component and its a bit clumsy as it throws an exception if validation error.
> So if we have a nice Predicate for it, it can be like a xpath predicate or the likes.
> [17:58]  <jstrachan> http://camel.apache.org/validation.html
> [17:58]  <ulhasb> jstrachan: thanks for the quick responses
> [17:59]  <cibsen> jstrachan we should maybe have a predicate for schema validation
> [17:59]  <cibsen> then you can route it a bit more nice without try .. catch
> [18:00]  * fbolton has quit ("Leaving.")
> [18:03]  * gertv has quit (Client closed connection)
> [18:05]  <jstrachan> cibsen: yeah
> [18:05]  <jstrachan> cibsen: maybe a kinda predicate language using the other validators? filter().validate(theValidationEndpointUri).to("blah")

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-1537) Predicate for validation

Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1537?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=59459#action_59459 ] 

Willem Jiang commented on CAMEL-1537:
-------------------------------------

Hi Christian,

I just went through your patch,  and did some changes on your patch before I committed the patch.

1. As the new added Validate is not just for RegExp, so I changed the class names
  RegExpValidatingProcessor to PredicateValidatingProcessor
  RegExpValidateException PredicateValidationException
2. Added a String member in the ValidateDefinition
3. I didn't figure out how to set the ValueBuilder from XML, so I added the a TODO note for it

Willem
     

> Predicate for validation 
> -------------------------
>
>                 Key: CAMEL-1537
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1537
>             Project: Apache Camel
>          Issue Type: New Feature
>    Affects Versions: 2.0-M1
>            Reporter: Claus Ibsen
>            Assignee: Christian Mueller
>            Priority: Minor
>             Fix For: Future
>
>         Attachments: CAMEL-1537.patch
>
>
> The current validator is a component and its a bit clumsy as it throws an exception if validation error.
> So if we have a nice Predicate for it, it can be like a xpath predicate or the likes.
> [17:58]  <jstrachan> http://camel.apache.org/validation.html
> [17:58]  <ulhasb> jstrachan: thanks for the quick responses
> [17:59]  <cibsen> jstrachan we should maybe have a predicate for schema validation
> [17:59]  <cibsen> then you can route it a bit more nice without try .. catch
> [18:00]  * fbolton has quit ("Leaving.")
> [18:03]  * gertv has quit (Client closed connection)
> [18:05]  <jstrachan> cibsen: yeah
> [18:05]  <jstrachan> cibsen: maybe a kinda predicate language using the other validators? filter().validate(theValidationEndpointUri).to("blah")

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CAMEL-1537) Predicate for validation

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-1537?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen updated CAMEL-1537:
-------------------------------

         Priority: Minor  (was: Major)
    Fix Version/s:     (was: 2.3.0)
                   Future

> Predicate for validation 
> -------------------------
>
>                 Key: CAMEL-1537
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1537
>             Project: Apache Camel
>          Issue Type: New Feature
>    Affects Versions: 2.0-M1
>            Reporter: Claus Ibsen
>            Priority: Minor
>             Fix For: Future
>
>
> The current validator is a component and its a bit clumsy as it throws an exception if validation error.
> So if we have a nice Predicate for it, it can be like a xpath predicate or the likes.
> [17:58]  <jstrachan> http://camel.apache.org/validation.html
> [17:58]  <ulhasb> jstrachan: thanks for the quick responses
> [17:59]  <cibsen> jstrachan we should maybe have a predicate for schema validation
> [17:59]  <cibsen> then you can route it a bit more nice without try .. catch
> [18:00]  * fbolton has quit ("Leaving.")
> [18:03]  * gertv has quit (Client closed connection)
> [18:05]  <jstrachan> cibsen: yeah
> [18:05]  <jstrachan> cibsen: maybe a kinda predicate language using the other validators? filter().validate(theValidationEndpointUri).to("blah")

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-1537) Predicate for validation

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1537?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=61363#action_61363 ] 

Claus Ibsen commented on CAMEL-1537:
------------------------------------

Just open tickets for these when you have the time. As the core feature is implemented in Camel 2.3 we need to close the ticket to indicate this.


> Predicate for validation 
> -------------------------
>
>                 Key: CAMEL-1537
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1537
>             Project: Apache Camel
>          Issue Type: New Feature
>          Components: camel-core
>    Affects Versions: 2.0-M1
>            Reporter: Claus Ibsen
>            Assignee: Christian Mueller
>            Priority: Minor
>             Fix For: 2.3.0
>
>         Attachments: CAMEL-1537.patch
>
>
> The current validator is a component and its a bit clumsy as it throws an exception if validation error.
> So if we have a nice Predicate for it, it can be like a xpath predicate or the likes.
> [17:58]  <jstrachan> http://camel.apache.org/validation.html
> [17:58]  <ulhasb> jstrachan: thanks for the quick responses
> [17:59]  <cibsen> jstrachan we should maybe have a predicate for schema validation
> [17:59]  <cibsen> then you can route it a bit more nice without try .. catch
> [18:00]  * fbolton has quit ("Leaving.")
> [18:03]  * gertv has quit (Client closed connection)
> [18:05]  <jstrachan> cibsen: yeah
> [18:05]  <jstrachan> cibsen: maybe a kinda predicate language using the other validators? filter().validate(theValidationEndpointUri).to("blah")

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.