Using the Service Registry with Talend ESB
Once initialized, Service Registry offers the following commands within the Talend Runtime Container to operate with the Registry:
Command | Description |
---|---|
tregistry:list <type> | Lists Registry resources by type. |
tregistry:create <type> <file> | Installs a Registry resource into the JCR repository. |
tregistry:read <type> <name> | Views the content of a Registry resource. |
tregistry:update <type> <name> <file> | Overwrites the content of a given Registry resource with the specified file. |
tregistry:delete <type> <name> | Removes a Registry resource from the JCR repository. |
tregistry:export [-a] type file | Exports Registry resource(s) to an AtomPub XML file. |
tregistry:import [-o] type file | Imports Registry resource(s) from an AtomPub XML file. |
-
type refers to the resource type (wsdl for WSDL, metadata for metadata, ws-policy for POLICY, or ws-policy-attach for POLICY ATTACHMENT),
-
name identifies the resource,
-
file refers to the filepath and filename of the object to upload,
-
-a exports the policies attached to the WSDL to export,
-
-o overrides the resources during the import.
To get more detailed information about each command, use the help as follows: help tregistry:update or <tregistry:update --help.
Examples of use of these commands:
trun> tregistry:list ws-policy
Talend ESB Registry :: Collection of ws-policy resources [size:2]
Name
- urn:uuid:87654321-abcd-bcde-cdef-123456789000
- UsernameToken
karaf@trun> tregistry:create ws-policy E:/talend/TESB/demo/SAMLToken.policy Create Registry ws-policy resource with name = e12dee61-cbc6-4b22-9555-6b9edfa2dd90 : DONE
If synchronization with ElasticSearch is enabled, a set of additional commands becomes available:
Command | Description |
---|---|
tregistry:sync <type> |
Updates ElasticSearch with the current resource content of the Service Registry. |
tregistry:search <type> <query> | Implements the specified search query of a Registry resource. |
-
type refers to the resource type, which only supports metadata,
-
query refers to a JSON string which is passed to ElasticSearch as query document.
tregistry:search metadata '{ "query": { "term": { "metadataExtension.ServiceName.raw" : "{http://www.talend.org/service/}DemoService" }}}'
-
the Service Registry User Interface available in the Talend Administration Center. For more information, see Managing Services and Policies.
-
AtomPub REST services. For more information, see AtomPub REST Service.