The communication library provides the following classes:
Article number/class name |
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
First, create and set up the host where REST-based communications are to be performed.
When specifying the method HTTP (or HTTPS) names to be executed, specify GET, POST, PUT, or DELETE, fully capitalized.
Use alphanumeric characters and symbols for 'element'.
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 |
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
To specify the name of a service for the "port" option, the service must be registered with the operating system for the Management Server. Check the settings for the operating system to see which services can be specified.
The only protocol for which port connections can be confirmed using this operation component is TCP.
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 |