You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by subh <su...@aol.com> on 2009/07/23 19:15:57 UTC

How to get in message appended to fault :: XSD validator

Hi,

I have an XSD validator service as below

<validation:endpoint service="orderservice:orsxsdvalidator" 
    					 endpoint="endpoint" 
    					
schemaResource="file:${servicemix.home}/orsconfig/OrderService.xsd"
    					 handlingErrorMethod="FAULT_FLOW">
            							 
	<property name="errorHandlerFactory">
		<bean
class="org.apache.servicemix.validation.handler.MessageAggregatingErrorHandlerFactory">
      		             <property name="rootPath"
value="OrderStatusXML/OrderStatus/OrderError/orderError"/>
    			<property name="namespace"
value="http://www.xyz.com/xi/orderService/os"/>
    			<property name="includeStackTraces" value="false"/>
			</bean>
	</property>
    					
</validation:endpoint> 

Its working fine and prints out the fault when XML validation fails

DEBUG - SedaQueue                      -
org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1@c824b6 dequeued
exchange: InOut[
  id: ID:10.30.9.61-122a84a40c4-4:44
  status: Done
  role: provider
  service: {http://services.xyz.com/orderservice}orsxsdvalidator
  endpoint: endpoint
  in: <?xml version="1.0" encoding="UTF-8"?><ns2:OrderService
xmlns:ns2="http://www.xyz.com/xi/orderService/os"><TransmissionHeader><Transmissio
nId>1248368941832</TransmissionId><TransmissionDate>2009-07-23T12:09:01</TransmissionDate><TransmissionTime>12:09:01.832-05:00</TransmissionTime><Tran
smissionStatus>original</TransmissionStatus><TransmissionSender>32788</TransmissionSender><TransmissionReceiver>32788</TransmissionReceiver></Transmis
sionHeader><Orders><Order
id="5030008"><orderNbr>5030008</orderNbr><status>5</status>...
  
  out: <?xml version="1.0" encoding="UTF-8"?><OrderStatusXML
xmlns="http://www.xyz.com/xi/orderService/os"><OrderStatus><OrderError><orderError>
<error><![CDATA[cvc-complex-type.4: Attribute 'id' must appear on element
'DeliveryContainer'.]]></error></orderError></OrderError></OrderStatus></Ord
erStatusXML>
  
  fault: <?xml version="1.0" encoding="UTF-8"?><OrderStatusXML
xmlns="http://www.xyz.com/xi/orderService/os"><OrderStatus><OrderError><orderErro
r><error><![CDATA[cvc-complex-type.4: Attribute 'id' must appear on element
'DeliveryContainer'.]]></error></orderError></OrderError></OrderStatus></O
rderStatusXML>
]

I would want the "in" message also to be part of the "fault" message, how to
achieve that?

Thanks and Regards
Subh
-- 
View this message in context: http://www.nabble.com/How-to-get-in-message-appended-to-fault-%3A%3A-XSD-validator-tp24630420p24630420.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.