Invoking APIs from the client environment

In order to call standard APIs from the client, ensure that the client environment is set up correctly. The client environment must have appropriate CLASSPATH settings and JAR files as described in this section for a basic configuration. SSL, JNDI, or other security requirements may affect your configuration.

Note: It is recommended that you do not invoke a local API in the application JVM before the server initialization. Also, if you are making a local API call, you must add the following code after the local API invocation in the block that has YIFClientFactoryImpl.getLocalApi and api.invoke:

The <runtime_sandbox>/resources/ directory must contain the file.

If you are calling in local mode, the client CLASSPATH must contain all JAR files referred to in the <runtime_sandbox>/properties/dynamicclasspath.cfg file.

When invoking APIs through EJB or HTTP, the client CLASSPATH must contain the following files in <WAS_HOME>/AppClient/properties directory:
  • xapi.jar
  • log4j-1.2.15.jar
  • platform_afc.jar
  • xercesImpl.jar
  • xml-apis.jar
  • ejbstubs.jar (or equivalent .jar file containing EJB stubs).

The client CLASSPATH must also contain the following files from <runtime_sandbox>/jar/:

  • install_foundation.jar
  • smcfs/9.1/smcfsshared.jar

Application server-specific files

In addition to the files listed above, the following files are required:

Application Server Required Files
IBM® WebSphere®

For WebSphere, use *ejb.jar available in the EAR file to retrieve the ejbstubs.jar.

  • j2ee.jar