The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

Michael Ueberbach (2) [Avatar] Offline
hello *,
I'm trying to use the validation service engine which is delivered with serviceMix 3.3.
the doc on the apache website shows how to define the appropriate endpoint for it.
but I'm a bit helpless in integrating this new service into the validation example of ch. 5
especially in combining it with the jms queues for in, out and error.
has someone an example for a service assembly
thanks for any hint
tijs.rademakers (494) [Avatar] Offline
Re: Chapter5 Validation using serviceMix 3.3
Hi Michael,

You can just change the lightweight container validation component to the validation component and use a configuration like this:

<validation:endpoint service="esb:validation" >

<property name="errorHandlerFactory">
<bean class="org.apache.servicemix.validation.handler.MessageAggregatingErrorHandlerFactory">
<property name="rootPath" value="Fault/payload/messages"/>
<property name="namespace" value=""/>
<property name="includeStackTraces" value="false"/>

This should behave the same as the lightweight container validation component. Let me know if this works for you.

Best regards,

Michael Ueberbach (2) [Avatar] Offline
Re: Chapter5 Validation using serviceMix 3.3
Hi Tijs,

sorry for the delayed answer, but I was out of office for some days. Thanks for your hint. In fact this works as expected. But I had to do some preparations in advance which may be of interest for others: service-mix 3.3 works with activemq-5.2.0. So I downloaded this version and changed all references to activemq I found.
In the ErrorHandlerComponent class I had to change some import declarations:
The classes ClientFactory, Destination and ServiceMixClient are now to be found in the package org.apache.servicemix.jbi.api instead of org.apache.servicemix.client. (The other ones are deprecated and lead to compiling errors)

There is also a strange warning while starting/deploying service-mix 3.3 which says that the class org/apache/activemq/camel/converter/ActiveMQMessageConverter$1.class could not be found on any classloaders although the appropriate jar of activemq-5.2.0 is referenced in the text of that warnung. I can't explain this.

By the way: you made a great book that makes a lot of fun to work with.

Kind regards,