Hi,

I have this split route that works well during unit testing, but not when
deployed in JBoss 5.1 environment. I am using Camel 2.4.0.  My route is
written as Spring XML file:

<split stopOnException="true">
 
<xpath>/message/body/category_definitions/category_definition[fixed_part='IMP']</xpath>
  <bean ref="CategoryProcessor" method="processImprint"/>
</split>

My CategoryProcessor bean has this method:

public Imprint processImprint(
 @XPath(resultType=String.class,
value="/category_definition/variable_part/text()") String code, 
 @XPath(resultType=String.class, value="/category_definition/text/text()")
String description
) 
{
  log.info("Processing imprint with code '" + code + "' and description '" +
description + "'");
  .....
  .....
}

The method is actually being called but the values of code and description
parameters are empty.
The only thing I noticed being different is that logging the exchange during
unit testing shows:

Exchange[ExchangePattern:InOnly,
BodyType:org.apache.xerces.dom.DeferredElementNSImpl,
Body:<category_definition>
        <fixed_part>IMP</fixed_part>
        <variable_part>BLAH</variable_part>
        <text>BLAH BLAH</text>
      </category_definition>]

But during integration testing (in the container) it shows:

Exchange[ExchangePattern:InOnly,
BodyType:org.apache.xerces.dom.DeferredElementImpl,
Body:[category_definition: null]]

Notice the BodyType and Body values are different. What is the difference
between the types "DeferredElementNSImpl" and "DeferredElementImpl"?  

Please help me.

FYI:  JBoss uses version 2.9.1 of Xerces, if that makes any difference.  I
am using this same version during unit test.

Thanks in advance.




-- 
View this message in context: 
http://camel.465427.n5.nabble.com/Split-XPath-JBoss-tp3198294p3198294.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to