z/OS DFSMSrmm Application Programming Interface
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Using the DFSMSrmm application programming interface with web services

z/OS DFSMSrmm Application Programming Interface
SC23-6872-00

DFSMSrmm samples provided: A sample Java™ Web service application, rmmSampleWSClient.java, is located in your file system directory /usr/lpp/dfsms/rmm/. The sample code shows how the application programming interface can be used with Web service.
Requirement: C/C++ or any other high-level language is required to exploit the DFSMSrmm class library. An XML parser (such as the one available in the XML toolkit for z/OS®) is required to process the XML output from the DFSMSrmm application programming interface. Also, Language Environment® for z/OS is required in order to install the DFSMSrmm class library. WebSphere® Application Server for z/OS V6.0.2 and later, or an equivalent, is required to host the DFSMSrmm Web service. You can also use Apache Tomcat as an alternative web server, or another web service middleware. Rational® Application Developer (RAD) , formerly known as WebSphere Studio Application Developer, or an equivalent, is required for implementation and development. The minimum requirement to do any changes is Java SDK.

The Tomcat readme file, rmmtc.txt, located under /usr/lpp/dfsms/rmm, contains installation and setup information.

You can write Java applications that run on any platform that can use the DFSMSrmm API classes to obtain information about DFSMSrmm resources. You use the same DFSMSrmm subcommand strings that you can use with the EDGXCI application programming interface. You get output in Extensible Markup Language (XML). If you receive the output from the DFSMSrmm application programming interface as XML output, you can use an XML parser to process the returned data, or you can package the XML in order to use it as the base for displaying information for the end user. See Receiving extensible markup language (XML) output data in the XML output buffer for additional information about XML output data.

Using Web services, the DFSMSrmm application programming interface appears to the application as a local application programming interface even though it is running on another system. The infrastructure to support the use of Web services must be implemented and available on both the application system and the target z/OS system running DFSMSrmm. The infrastructure to support Web services on the target z/OS system is provided by WebSphere Application Server or Apache Tomcat open source servlet container. You can use an equivalent product, but additional customization and programming may be required by you. You can use Rational Application Developer (RAD) to develop applications that use the DFSMSrmm application programming interface with Web services.

The DFSMSrmm application programming interface Web service can be deployed either under z/OS WebSphere Application Server or Apache Tomcat (or another web service middleware).

The web service to be used under z/OS WebSphere Application Server is an Enterprise ARchive (EAR) file called rmmapi.ear and is located in your file system directory /usr/lpp/dfsms/rmm/. This EAR file contains all the elements needed to implement and use the Web service. To install the DFSMSrmm Web service, use the WebSphere Install Application. You can use either the graphical user interface or the command line tool for the installment and customization of your WebSphere environment. To develop a client application that uses the DFSMSrmm Web service, either import the EAR file into your project using Rational Application Developer (RAD) and use the definitions and codes it contains for your application, or use the sample client application shipped with DFSMSrmm, rmmSampleWSClient.java. After your application is written, modify the installation or environment-dependent information in the EAR file so you can implement the Web service in your environment. For more information, see the general web service help file rmmwebs.txt.

The web service to be used under Apache Tomcat is shipped as a Web ARchive (WAR), called rmmapitc.war. For more information, see the general web service help file rmmwebs.txt. An additional help file for the Apache Tomcat environment, rmmtc.txt, is also available.

The Java class, RmmJApi.class, is the core part of the DFSMSrmm Web services. You can use it to access DFSMSrmm from inside z/OS, too. Packaged in rmmjapi.jar, located in your file system directory /usr/lpp/dfsms/rmm/, it is available to access the DFSMSrmm application programming interface locally from a Java program. It is important to make sure that the rmmjapi.jar file is included in the CLASSPATH environmental variable. RmmJApi.class supports the method RmmJApi.runCommandXml. See DFSMSrmm high level language API classes for additional information.

When you use the runCommandXml method to run a search command, it is possible to encounter a memory size limitation problem. A default limit of one megabyte is set for the returned data. This equals roughly 500 volumes (one volume resulting in about 2 kilobytes of data). If you are requesting a larger number of resources to be returned, you will reach this limit. (See the readme files for information on how to increase the memory limit of 1 megabyte.) The returned XML string ends after a complete resource, and message EDG3921I is added to the string. This message explains system status. Additionally, return code 4 and reason code 10 are added to enable you to correctly handle the returned data. You can narrow the search request by using one or more of the operands on the search subcommand, such as LIMIT, OWNER, or CONTINUE, or try to adjust the default limit (see z/OS DFSMSrmm Implementation and Customization Guide for additional information). The possible maximum limit depends on your environment. Check your JVM (Java Virtual Machine) and TCPIP settings. Using the CONTINUE operand, you can issue a sequence of calls to the web service, with the second and subsequent requests including the continue information returned by the previous request.

Another way to deal with memory size limitation is to use method runCommandXmlShort (see DFSMSrmm API methods). This method returns key data for the requested resources only, thus significantly reducing the size of the returned XML string.

To further help with memory usage and to reduce the amount of data returned from the Web service, you can use GZIPInputStream to zip the command string and then you can use GZIPOutputStream to convert the returned output back to a string. See rmmSampleWSClient.java for a coding example.

You may want to publish your DFSMSrmm application programming interface Web service in a UDDI registry. The sample client comes without UDDI support. It is your task to publish the Web service to an UDDI registry and to implement the code for the discovery of the service. You can also write your application so that it does not need to dynamically discover where the Web service is located, or you can use a local or more general UDDI registry to discover the system that provides the Web service you need. If the services that the DFSMSrmm application programming interface Web service provides are specific only to your local system, it is recommended that you use a UDDI registry that is local to your system.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014