Top
Systemwalker Runbook Automation Reference Guide
Systemwalker

3.15.11 Communication Library

The communication library provides the following classes:

Article number/class name

3.15.11.1 REST

3.15.11.2 Check that Connection to the Port is Possible

3.15.11.1 REST

Class Name

Swrba_Protocol

List of Methods

Method

Description

String rest_request(String hostname, Integer port, String methodname, String resourcepath, String param, String proxy, Integer proxyport, String protocoltype,String requestxml, String contenttype, String accepttype)

Send the REST-based request to the specified host and receive the result.

If send/receive is successful, results received are output as an XML file.

An exception is returned if send/receive failed.

String rest_request_basic(String hostname, Integer port, String methodname, String resourcepath, String param, String basicusername, String basicpassword, String proxy, Integer proxyport, String protocoltype, String requestxml, String contenttype, String accepttype)

Send the REST-based request to the specified host using BASIC authentication and receive the result.

If send/receive is successful, results received are output as an XML file.

An exception is returned if send/receive failed.

Integer return_code()

Return the return value of the results of the REST-based communications.

Input Information

hostname	Specify the host name or IP address.
port	Specify the port number of the host performing REST-based communications.
methodnameSpecify the method name of HTTP (HTTPS) to be executed. Specify GET, POST, PUT, and DELETE for the method name.
resourcepathSpecify the path of the resource to be used.
paramSpecify the argument name and argument value for the resource to be used.
basicusernameSpecify the name of the user performing BASIC authentication.
basicpasswordSpecify the password of the user performing BASIC authentication.
proxy	Specify the address of the proxy server.
proxyport	Specify the port number of the proxy server.
protocoltype	Specify the protocol type to perform REST communication. Specify http or https for the protocol type.
requestxml	Specify the request in the XML format to be stored in the body with REST communication.
contenttype	Specify the data form (MIME type) communicated by the REST communication. Moreover, the character set can be added.
accepttype	Specify the data form (MIME type) that can be received by the REST communication.

Notes

File Location

Windows

<Installation directory>\SWRBAM\rbaope\bin\parts\lib\

standard\swrba_protocol.rb

Linux

/opt/FJSVswrbam/rbaope/bin/parts/lib/standard/swrba_protocol.rb

3.15.11.2 Check that Connection to the Port is Possible

Class Name

Swrba_Protocol

List of Methods

Method

Description

String port_check(String hostname, String port)

This method checks whether it is possible to connect to a port on the specified host.

If the method successfully verifies that a connection is possible, it returns "Success".

If the method fails to verify that a connection is possible, it returns an exception.

Integer return_code()

This method returns the return value for the result of checking the port status.

Input Information

hostname  Specify the host name or IP address.
port      This is the port number or service name for the port that will be checked to see if
          a connection can be made.

Notes

File Location

Windows

<installation path>\SWRBAM\rbaope\bin\parts\lib\standard\swrba_protocol.rb

Linux

/opt/FJSVswrbam/rbaope/bin/parts/lib/standard/swrba_protocol.rb