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.

ESB-Harry (5) [Avatar] Offline
Could you please post an example how to use the validation?

Do i have to call it e.g. from a pipeline?
After validating the XML, where can i define a target?

Thank you
tijs.rademakers (494) [Avatar] Offline
Re: ServiceMix-Validation

I've posted an example about how to use the servicemix validation component a month ago, see:𓈟

In fact, it works quite similar to the validation example that's included in the book in chapter 5. This example uses the validation lightweight component, but the servicemix validation JBI component is about the same configuration. Let me know if you need more info.

Best regards,

ESB-Harry (5) [Avatar] Offline
Re: ServiceMix-Validation
Hi Tijs,

i did it exactly that way.
I replaced the lightweight container with the new validation component.

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

<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"/>

Then i copied and customized the with
Destination destination = client.createDestination(

Fault message below is returned:

java.lang.NoSuchMethodError: org.apache.servicemix.client.ServiceMixClient.createDestination(Ljava/lang/StringsmilieLorg/apache/servic
at ps.component.ErrorHandlerComponent.onMessageExchange(
at org.apache.servicemix.bean.BeanEndpoint.onProviderExchange(
at org.apache.servicemix.bean.BeanEndpoint.process(
at org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(
at org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(
at org.apache.servicemix.common.AsyncBaseLifeCycle.onMessageExchange(
at org.apache.servicemix.common.SyncLifeCycleWrapper.onMessageExchange(
at org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(
at org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(
at org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(
at org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(
at java.util.concurrent.ThreadPoolExecutor$

I call the ErrorHandlerComponent right after receiving the message at the JMS queue.

Could it be, that there is an error with in-only and in-out message?
How can i fix it?


Best regards

ESB-Harry (5) [Avatar] Offline
Re: ServiceMix-Validation

doesn´t work yet.

There is a problem creating the client in the ErrorHandlingComponent.

Could it be that this Component (Example for servicemix-3.2.1) doesn´t work in servicemix-3.3?

First i developed on 3.2.1 and now i am switching to 3.3 to use the validation component.