One Star

cSetBody namespace

Could someone telle me how to declare specific namespace to use in the xpath expression of a cSetBody ?
One Star

Re: cSetBody namespace

Self reply:
I've created a bean with annotations.
The Xpath annotation allows to specify a namespace:
package beans;
import org.apache.camel.language.NamespacePrefix;
import org.apache.camel.language.XPath;
import org.apache.commons.codec.binary.Base64;

public class Decode64XmlIn {
public String process(@XPath(
value = "//bus:xmlIn",
namespaces = @NamespacePrefix(
prefix = "bus",
uri = "http://business")) String body) throws Exception {
return ( new String(Base64.decodeBase64(body.getBytes())));