You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by "Andreas A." <an...@gmail.com> on 2010/11/30 12:21:51 UTC

Validator does not recognize body as XMl document?

Hi

When I try to validate a marshalled XML document the validator component
throws an exception saying that no XML body is found on the object. However
if I comment out the validator the route progresses correctly and the XML is
transformed as expected. Am I missing something or is this a bug?

<from uri="jms:{{jms.queue.out}}{{filter.message.selector}}" />
<bean ref="{{mapper.id}}" method="transformToXmlModel" />
<marshal ref="jaxbMyFormat" />
<to uri="validator:file:{{schema.xsd.format1}}"/>  <--- exception
<to uri="xslt:file:{{xslt.myXslt}}" />
<to uri="validator:file:{{schema.xsd.format1}}"/>



-- 
View this message in context: http://camel.465427.n5.nabble.com/Validator-does-not-recognize-body-as-XMl-document-tp3285928p3285928.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Validator does not recognize body as XMl document?

Posted by "Andreas A." <an...@gmail.com>.
Doing a <convertBodyTo type="String" /> corrects makes the validator
recognize this as xml and not a SpyObjectMessage.
-- 
View this message in context: http://camel.465427.n5.nabble.com/Validator-does-not-recognize-body-as-XMl-document-tp3285928p3286226.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Validator does not recognize body as XMl document?

Posted by "Andreas A." <an...@gmail.com>.
Error:
org.apache.camel.processor.validation.NoXmlBodyValidationException: No XML
body could be found on the input message. Exchange[JmsMessage:
org.jboss.mq.SpyObjectMessage {
Header { 
   jmsDestination  : QUEUE.MyQueue
   jmsDeliveryMode : 2
   jmsExpiration   : 0
   jmsPriority     : 4
   jmsMessageID    : ID:184-12911301350941
   jmsTimeStamp    : 1291130135094
   jmsCorrelationID: null
   jmsReplyTo      : null
   jmsType         : null
   jmsRedelivered  : false
   jmsProperties   : {JMSXDeliveryCount=1, redirect=true}
   jmsPropReadWrite: false
   msgReadOnly     : true
   producerClientId: ID:184
}
}]
-- 
View this message in context: http://camel.465427.n5.nabble.com/Validator-does-not-recognize-body-as-XMl-document-tp3285928p3286223.html
Sent from the Camel - Users mailing list archive at Nabble.com.