Class XpathMetadataService

All Implemented Interfaces:
AdaptrisComponent, ComponentLifecycle, ComponentLifecycleExtension, ConfigComment, MessageEventGenerator, Service, StateManagedComponent

@ComponentProfile(summary="Extract data via XPath and store it as metadata", tag="service,metadata,xml,xpath") public class XpathMetadataService extends MetadataServiceImpl
Store values extracted from message payload using XpathQuery as metadata.

This service will support XPath 2.0+ features, but in order to use XPath 2.0 features you must use Saxon as your XPath provider. This means either explicitly removing all DocumentBuilderFactoryBuilder configuration, or ensuring that namespace-aware is set to 'true' in the DocumentBuilderFactoryBuilder configuration.

If the DocumentBuilderFactoryBuilder has been explicitly set to be not namespace aware and the document does in fact contain namespaces, then Saxon can cause merry havoc in the sense that //NonNamespaceXpath doesn't work if the document has namespaces in it. We have included a shim so that behaviour can be toggled based on what you have configured.

See Also:

In the adapter configuration file this class is aliased as xpath-metadata-service which is the preferred alternative to the fully qualified classname when building your configuration.

  • Constructor Details

    • XpathMetadataService

      public XpathMetadataService()

      Creates a new instance.

  • Method Details