-
1. Re: How to trigger XML validation of response message.
igarashitm Sep 26, 2014 9:26 PM (in response to mh1)Are you sure your response message type is exactly same as name attribute of your validator definition? If you use Java interface for the service, you may want to add @OperationTypes(out = "{urn:your-namespace}yourOutMessageType") on a service operation in the service interface definition. Please attach a small reproducer if you can't solve with it.
-
2. Re: How to trigger XML validation of response message.
mh1 Oct 1, 2014 6:37 AM (in response to igarashitm)Apologies - this investigation has had to be down-graded in priority so I have had no time this week to look further into this.
However, your answer was of value to me because by implication it told me I should be able to expect the out-bound response message to be XML Schema validated if I/we get everything configured properly.
If/when I get back to looking at this issue, if I still cannot resolve the "how" I'll come back here. For now I've marked the answer as good since it at least got me the confirmation I was looking for.
Many thanks,
Mark.
-
3. Re: How to trigger XML validation of response message.
jorgemoralespou_2 Oct 1, 2014 10:28 AM (in response to mh1)Hi,
Validations are applied several times for an Exchange.
If the Exchange is IN_ONLY it is applied before and after the message has been transformed. (if any).
If the Exchange is IN_OUT it is also applied for the response message, before and after is been transformed (if any).
One exception to this is, if the validation has been already applied to the type, it will not be applied again. But, looking at: core/ValidateHandler.java at master · jboss-switchyard/core · GitHub It seems that this is an Exchange scoped property, so if the this property somehow is copied to the new Exchange (camel seems to propagate these properties) it may definitely avoid going through the validation again in the outgoing request.
To test if this is true you can remove this property "org.switchyard.validatedType" from the context.
If it happens to be true whatever I say, please raise a JIRA, as this will be a bug.
PS: I'm not a SwitchYard commiter, so I might be very wrong ;-)