Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
ytuzet
Creator
Creator

cSetBody namespace

Hi,
Could someone telle me how to declare specific namespace to use in the xpath expression of a cSetBody ?
Labels (2)
1 Reply
ytuzet
Creator
Creator
Author

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())));
}
}