Creating Custom XPath Functions with Multiple Java Classes
You can also create custom XPath functions with multiple Java classes within the same plug-in.
- Procedure
-
Create different classes in the same plug-in.
- Update the category, prefix, and namespace for the newly created Java class as per requirement. For example:
@XPathFunctionGroup(category = "Another Custom Function", prefix = "mytns2",namespace = "http://my.xpath2", helpText = "Another Custom defined function")
-
Navigate to
plugin.xml
and add custom XPath extensions on the Extensions tab. -
To update the class name and id, on the Extension Element Details pane click Browse.
-
Create OSGi component for the newly created class as follows.
-
Repeat steps 3, 4, and 5 for other classes in the same plug-in.
-
Update the manifest file to include the
OSGI-INF/cxf.xml
,OSGI-INF/foo_cxf.xml
, andOSGI-INF/next_cxf.xml
service components. -
Export the plug-ins and install into the host repository.
-
Restart TIBCO Business Studio for BusinessWorks.