10 Invoking a Web Service from a Standalone Client

A description of how to invoke an Oracle Infrastructure web service from a standalone client is detailed in this chapter.

It includes the following sections:

10.1 Using a Standalone Client Jar to Invoke a Web Service

When invoking an Oracle Infrastructure web service from an environment that does not have Oracle Fusion Middleware installed locally, with the entire set of Oracle Fusion Middleware classes in the CLASSPATH, you can use the standalone client JAR file to invoke the web service.

The standalone client JAR supports basic Oracle Infrastructure web service client-side functionality and OWSM security policies.

To use the standalone client JAR file with your client application, perform the following steps:

  1. Create a Java SE client using your favorite IDE, such as Oracle JDeveloper.
  2. Copy the file ORACLE_HOME/oracle_common/modules/clients/com.oracle.webservices.fmw.client_12.1.3.jar from the computer hosting Oracle Fusion Middleware to the client computer, where ORACLE_HOME is the directory you specified as Oracle Home when you installed Oracle Fusion Middleware.

    For example, you might copy the file into the directory that contains other classes used by your client application.

  3. Add the JAR file to your CLASSPATH.
  4. Configure your environment for Oracle Web Services Manager (OWSM) policies. This step is optional, required only if you are attaching OWSM security policies to the web service client.

    The configuration steps required vary based on the type of policy being attached. See the following examples:

    Note:

    For additional configuration requirements, see "Configuring Java SE Applications to Use OPSS" in .

10.2 Supporting Basic Authentication

You have to perform certain steps to support basic authentication when you invoke an Oracle Infrastructure web service from a standalone client.

To support basic authentication using the oracle/wss_http_token_client_policy security policy, perform the following steps:

  1. Copy the jps-config-jse.xml and audit-store.xml files from the domain_home/config/fmwconfig directory, where domain_home is the name and location of the domain, to a location that is accessible to the web service client.
  2. Create a wallet (cwallet.sso) in the same location that you copied the files in step a that defines a map called oracle.wsm.security and the credential key name that the client application will use (for example, weblogic-csf-key).

    The location of the file cwallet.sso is specified in the configuration file jps-config-jse.xml with the element <serviceInstance>.For more information, see "Using a Wallet-based Credential Store" in .

  3. On the Java command line, pass the following property defining the JPS configuration file copied in step 1:
    -Doracle.security.jps.config=<pathToConfigFile>
    

    For more information, see "Scenario 3: Securing a Java SE Application" in .

10.3 Supporting SSL Policies

You have to perform certain steps to support SSL policies when you invoke an Oracle Infrastructure web service from a standalone client.

To support SSL policies, perform the following steps:

  1. Copy the jps-config-jse.xml and audit-store.xml files from the domain_home/config/fmwconfig directory, where domain_home is the name and location of the domain, to a location that is accessible to the web service client.
  2. On the Java command line, pass the following properties, defining the JPS configuration file copied in step 1:

    Define the JPS configuration file copied in step 1:

    -Doracle.security.jps.config=<pathToConfigFile>
    

    For more information, see "Scenario 3: Securing a Java SE Application" in .

    Define the trust store containing the trusted certificates:

    -Djavax.net.ssl.trustStore=<trustStore>
    

    For more information, see "Setting Up the WebLogic Server in Case of a Java SE Application" in "Setting Up a One-Way SSL Connection to the LDAP" in .

    Define the trust store password:

    -Djavax.net.ssl.trustStorePassword=<password>