createWSRRDefinition command

Use the createWSRRDefinition command to create a WSRR definition.

The createWSRRDefinition command is a multistep command in which the steps define the type of connection definition and its specific properties. You can specify only one step, because a WSRR definition can have only one connection definition.

Use the following command to list all the WSRR administrative commands:
$AdminTask help SIBXWSRRAdminCommands

The createWSRRDefinition command is run using the AdminTask object of the wsadmin scripting client.

Prerequisites

The following conditions must be met:
  • The command must be run on the deployment manager node.
  • If the deployment manager is stopped, use the wsadmin -conntype none option to run the command in disconnected mode.
  • If the deployment manager is running, you must connect with a user ID that has WebSphere Application Server configurator privileges. Do not use the wsadmin -conntype none option.

Location

Start the wsadmin scripting client from the deployment_manager_profile/bin directory. The createWSRRDefinition command does not write to a log file, but the wsadmin scripting client always writes a profile_root/logs/wsadmin.traceout log file where you will find exception stack traces and other information.

Syntax

createWSRRDefinition
-name definitionName
-connectionType WEBSERVICE
-defaultCacheExpiryTimeout timeout
[-description defDescription]

Parameters

-name definitionName
A required parameter that specifies the name of the WSRR definition, as a string.
-connectionType WEBSERVICE
A required parameter that specifies the connection type. The only connection type is WEBSERVICE.
-defaultCacheExpiryTimeout timeout
A required parameter that specifies the timeout of the cache, in seconds. A value of 0 indicates that query results are never cached. The default value is 300.
-description defDescription
An optional parameter that provides a brief description of the definition. This parameter is provided as a reference.

Steps

If you specify more than one step, an exception is thrown.
To set properties for a web service connection associated with the WSRR definition, you can specify values for the registry URL, the authentication alias and the SLL configuration as follows:
-WSConnection {{registryURL authAlias repertoire}}
To use the default registry URL (which is http://localhost:9080/WSRRCoreSDO/services/WSRRCoreSDOPort), specify a pair of double quotation marks ("") for the first value. To omit the authentication alias, specify a pair of double quotation marks ("") for the second value. To omit the repertoire (the SLL configuration), specify a pair of double quotation marks ("") for the third value.

Examples

The following example shows how to use the default connection:
wsadmin>AdminTask.createWSRRDefinition( ['-name', 'mydefName', '-description', my description',
		 	'-defaultCacheExpiryTimeout', '300', '-connectionType', 'WEBSERVICE'] )
The following example shows how to set the connection properties:
wsadmin>AdminTask.createWSRRDefinition( ['-name', 'mydefName', '-description', my description', 
    '-defaultCacheExpiryTimeout', '300', '-connectionType', 'WEBSERVICE', 
    '-WSConnection ', ['-registryUrl', 'http://localhost:9080', '-authAlias', 'AUTH_ALIAS1', '-repertoire', 'SSL_CONFIG1']] )
The following example shows how to set one connection property by using an alternative list syntax:
wsadmin>AdminTask.createWSRRDefinition( ['-name', 'defName', '-description', my description', 
    '-defaultCacheExpiryTimeout', '300', '-connectionType', 'WEBSERVICE', 
    '-WSConnection', [ ["" AUTH_ALIAS1  ""] ]] )