Web services jobs
A Web services job runs a Web service of your choice. Web services jobs work only with input and output parameters that use simple data types.
A description of the job properties and valid values are detailed in the context-sensitive help in the Dynamic Workload Console by clicking the question mark (?) icon in the top-right corner of the properties pane.Attribute | Description/value | Required |
---|---|---|
application name | ws | ✓ |
operation | The name of the web service command you are invoking. | ✓ |
wsdlURL | The name of the web service URL. | ✓ |
arguments | The parameters required by the web service command you are invoking (the number of values depends on the command). | |
credentials | The name and password of the user running this job. As an alternative to
hard-coding actual values, you can parametrize in one of the following ways:
If you use an HTTPS connection, ensure that the security certificates are configured for Job Manager on the workstation where the job is to run. |
The command output is recorded in the job log.
getSum
Web services command. The task definition
provides in the arguments
section the two values that must be
added.$JOBS
AGENT#WEB_SERVICE
TASK
<?xml version="1.0" encoding="UTF-8"?>
<jsdl:jobDefinition xmlns:jsdl="http://www.ibm.com/xmlns/prod/scheduling/1.0/jsdl"
xmlns:jsdlws="http://www.ibm.com/xmlns/prod/scheduling/1.0/jsdlws" description=
"Calls a web
service to perform a sum of two numbers" name="SumNumber">
<jsdl:annotation>annotation</jsdl:annotation>
<jsdl:variables>
<jsdl:stringVariable description="URL of Web Service"
name="wsdlURL">http://np515516.cyber.com:9080/
Sum/services/Sum/wsdl/Sum.wsdl</jsdl:stringVariable>
<jsdl:stringVariable description="Operation to Invoke"
name="Operation">getSum</jsdl:stringVariable>
</jsdl:variables>
<jsdl:application name="ws">
<jsdlws:ws>
<jsdlws:wsToInvoke operation="${Operation}" wsdlURL="${wsdlURL}">
<jsdlws:arguments>
<jsdlws:value>1</jsdlws:value>
<jsdlws:value>2</jsdlws:value>
</jsdlws:arguments>
<jsdlws:credentials>
<jsdl:userName>administrator</jsdl:userName>
<jsdl:password>password</jsdl:password>
</jsdlws:credentials>
</jsdlws:wsToInvoke>
</jsdlws:ws>
</jsdl:application>
<jsdl:resources>
<jsdl:candidateHosts>
<jsdl:hostName>${host}</jsdl:hostName>
</jsdl:candidateHosts>
</jsdl:resources>
</jsdl:jobDefinition>
JVMOptions
key in the
jobManager.ini
file of the agent to point to the security
certificates.JVMOptions=-Djavax.net.ssl.keyStore=/images/ITAuser/TWA/TWS/JavaExt/cfg/agentKeystore.jks
-Djavax.net.ssl.keyStorePassword=tdwb8nxt
-Djavax.net.ssl.trustStore=/images/ITAuser/TWA/TWS/JavaExt/cfg/agentKeystore.jks
-Djavax.net.ssl.trustStorePassword=tdwb8nxt
-Djavax.net.ssl.trustStoreType=JKS
By default, the timeout period for web services jobs is 90 seconds. If the web service has not completed successfully within the timeout period, the HCL Workload Automation job associated to it ends in error. To prevent jobs from failing when web services take longer than 90 seconds to complete, you can customize the timeout.
WSJobExecutor.properties
file that is located in the following path:- On Windows operating systems
- TWS_INST_DIR\TWS\JavaExt\cfg
- On UNIX operating systems
- TWA_DATA_DIR/TWS/JavaExt/cfg
# Web Service timeout
# Specify the timeout in seconds
# Default Value is 90 seconds
TIMEOUT=90
For
example, for a web service that takes 5 minutes to complete, customize the configuration file
specifying: TIMEOUT=300
.See also
From the Dynamic Workload Console you can perform the same task as described in
For more information about how to create and edit scheduling objects, see