Shortcuts Usage in the Action File

One of the advantages of using the action file template is that you can use shortcuts to define the parameter names. In order to use shortcuts, you must add the t:templatename.xml parameter to the command line. The template contains the action, so the action parameter is not required when using a template.

Below is an example command line using shortcuts:

java cfcc.CFAdmin t:AddFile.xml U:xyz P:xyz KN:certificate KP:pswd CFN:clientfile.txt SFN:serverfile.txt UID:user1 AuthGroupId:TransferRight TKN:cacerts TKP:changeit

The shortcut names can be changed by the user. The shortcut names defined in the XML template are the default shortcut names. In the above text, the CFN parameter is defined as the shortcut name for the ClientFileName parameter. If you want, you can change this value to any value that you want, as long as the value does not conflict with an existing parameter name or shortcut value. For example, you could use a text editor to change the value CFN to CN. Therefore, you could use the value CN in the command line to reference the ClientFileName parameter whenever you used that XML template file.

If file Global.xml is updated to contain the user ID, password and keystore information, then you could simply execute:

java cfcc.CFAdmin a:addFile

For client certificate authentication, the client must specify the keystore for its certificate via the Java system parameter, or via the command line’s KN and KP parameters. To run the program over an SSL connection, the certificate authority (CA) that signed client’s certificate must be a trusted CA. This may require you to update your keystore.
Note: The batch file used to set up the classpath overwrites the default system classpath. Experienced users are encouraged to use other environment variable for classpath, and specify classpath in the Java command.
Name Description
U The user ID sent to the web service for authentication to use the web service. May be specified in Global.xml.
P The user password sent to web service for authentication to use the web service. May be specified in Global.xml.
A The action to take. For example, add file. If the parameter is specified, the program ignores the T parameter that specifies the action file name. The program only accepts one action from command line.
T The action file name. The file can contain multiple actions in XML format. The program executes all actions specified in the file. If the program specified A parameter, this parameter is ignored.
TL The trace level. This value only affects this utility. This parameter should only be set when instructed to do so by TIBCO Technical Support. The valid values supported for this parameter are as follows:
  • 0: no tracing
  • 1-5 and 10: different levels of tracing
TD The trace directory. This value only affects this utility. Sets the directory where the trace files are written.
G The global template file name. The default one is Global.xml in the current directory.
S The web service address. For example: https://ip:port/cfcc/…..
KN The Java keystore name for client certificate authentication. Keystore name can be specified as a Java parameter, in which case, it is not necessary to use this parameter again. May be specified in Global.xml.
KP The Java keystore password for client certificate authentication. Keystore password can be specified as a Java parameter, in which case, it is not necessary to use this parameter again. May be specified in Global.xml.
TKN The trusted Java keystore name for certificate authentication. This file should contain the name of the keystore file that contains the Java Trusted Certificate Authorities. You can leave this parameter blank if you want to use the default trusted keystore. May be specified in Global.xml.
TKP The trusted Java keystore password for client certificate authentication. If the default password is used, you can leave this parameter blank. May be specified in Global.xml.
help The program displays the command line parameter list.
help:action The program displays the parameters needed for the action if the action is a valid action; Otherwise, display all currently supported actions.
Name:value Other name:value pairs. These values are used to assign the parameters’ value if the action is specified by A parameter, or to replace the default values if T parameter is used. The name is case sensitive if name is a parameter name for an action. The 'name' is not case sensitive if ‘name’ is a shortcut for a real parameter name.

Below are four entries defined in the addFile.xml file.

<arg name="ClientFileName" value="clientFileName" sc="CFN" description="Client File Name"/>
<arg name="ServerFileName" value="serverFileName" sc="SFN" description="Server File Name"/>
<arg name="Description" value="fileDesc" sc="D" description="File Description"/>
<arg name="UserId" value="user id" sc="UID" description="UserID authorized to transfer this file"/>
Note: Parameter that starts with the value sc=. This is the shortcut name that is defined by the XML file. When executing the TIBCO MFT Internet Server Administrator Command Line Utility with the Action File parameter T: defined, you can use the shortcut name instead of the actual parameter name.
For example in the above example, when defining the client file name, you could use the CFN parameter instead of the ClientFileName parameter. Below are examples of using standard parameters and shortcuts in TIBCO MFT Internet Server commands:
  • Using standard parameter names:

    java cfcc.CFAdmin a:addFile ClientFileName:client.file1 ServerFileName:prod.file.name Description:”file upload” Userid:acctuser

  • Using shortcut parameter names:

    java cfcc.CFAdmin t:addFile.xml CFN:client.file1 SFN:prod.file.name D:”file upload” uid:acctuser

As you can see, the parameter names are much shorter when using the shortcut parameters. Once again, note that the shortcut parameter names can only be used when the Action File Template T: parameter is used in the CFAdmin command. The shortcut values must be defined by the sc= value in the template.