Create Adapter Services on the fly Using wm.art.dev.service:createAdapterServiceNode

Hello everyone,

I’m trying to create a dummy service that will generate adapter services dynamically based on input from files. I’m able to put in default parameters for createAdapterServiceNode (WmArt > wm > art > dev > service) which spits out an empty adapter service with the name I provide.

What I haven’t figured out is how to pass the correct adapterServiceSettings to populate the rest of the fields like schema, table, inputs, columns, etc.

Can someone give me guidance? Just from playing around, i feel like what i’m trying to achieve is possible. Is there a document reference I’m missing? Or is there some other documentation provided elsewhere that I’ve missed until now?

Any help is appreciated.

I doubt SAG provides documentation on WmART (i.e., wm.art), you have to read the underlying java class file and pass the arguments for the service.

Hi Derek,

In the IS Built-In-Services Reference there is Chapter for ART-Services.

When the service you are planning to use is not described there it is considered for internal use only.

Can you elaborate on your use case please why you want to create adapter services dynamically.

Most likely it will require at least adapter type, connection alias, service template as wells as package name and service name.

Regards,
Holger

I’d create a dummy adapter service that would more or less correspond to the ones I’d like to create, then analyze the created .ndf file (also decode the base64 encoded part), and then create those files from scratch using that info.

You could know the field type, field name you need to generate adapter service by following the steps below:

  1. You need to know the service template name, they’re usually the same as service class name.
    For JDBCAdapter Select Template as an example, the service template name is “com.wm.adapter.wmjdbc.services.Select”.

  2. Use this parameter to invoke service “wm.art.dev.service:fetchAdapterServiceTemplateMetadata” (you will also need to provide a connection alias name to invoke), it will return metadata of specific service template, including the parameter details you need.

The code below shows part of the output.


systemName 	tables.schemaName
displayName 	Schema Name
description 	
parameterType 	[Ljava.lang.String;
groupURL 	/WmJDBCAdapter/doc/OnlineHelp/AdapterOH.html
groupName 	Tables
tupleName 	
treeName 	tables.catalogName
treeDelimiter 	.
resourceDomain 	tables.tableIndexes+: schemaNames(tables.catalogName)
defaultValue 	
minSeqLength 	1
  1. Use the systemName found in step2 as the key, and put all the parameters under adapterServiceSettings input field, that should solve your problem. Just remember to make the parameter type the same as the paramterType found in step2.