25 Configuring Web Services

This chapter describes how to configure the resources required to support advanced web services and SOAP over JMS in Oracle WebLogic Server Multitenant (MT) using WebLogic Scripting Tool (WLST) scripts. It also provides specific configurations that are required when using web services in a WebLogic Server MT environment.

This chapter includes the following sections:

Configuring Web Services: Overview

WebLogic Server includes two WLST scripts that provide the ability to configure the resources required for the following JAX-WS web service features in a WebLogic Server MT environment:

  • wlsws-advanced-jaxws-mt-config.py: Configures advanced JAX-WS web services including asynchronous messaging, web services reliable messaging, message buffering, web services atomic transactions, and security using WS-SecureConversation.

  • wlsws-soapjms-mt-config.py: Configures SOAP over JMS transport.

Both scripts are located in the oracle_home/oracle_common/webservices/bin/ directory, where oracle_home is the directory that you specified as Oracle home when you installed WebLogic Server.

Configuring Web Services: Main Steps

To configure web service resources in a WebLogic Server MT environment:

  1. If you have not already done so, create a domain partition. For more information, see Configuring Domain Partitions.
  2. If you have not already done so, create a resource group in the partition. For more information, see Configuring Resource Groups.
  3. At the domain level, create a user configuration file and an associated key file using the storeUserConfig WLST command. For more information, see "storeUserConfig" in WLST Command Reference for WebLogic Server.
  4. Execute one or both of the WLST scripts from the JAVA_HOME/bin/java directory. Note that you must include the location of the weblogic.jar file in the class path.

    For example, to configure the resources required for the WebLogic Server MT advanced web services for JAX-WS, use the following command:

    JAVA_HOME/bin/java -classpath weblogic.jar_location weblogic.WLST ./wlsws-advanced-jaxws-mt-config.py 
    -myUserConfigFile userConfigFile -myUserKeyFile userKeyFile 
    -myURL AdminServer_t3_url -partitionName partitionName 
    -rgName resourceGroupName -isCluster true_or_false 
    -middlewareHome middlewareHomeDir
    

    To configure the resources required in WebLogic Server MT for SOAP over JMS transport, use the following command:

    JAVA_HOME/bin/java -classpath weblogic.jar_location weblogic.WLST ./wlsws-soapjms-mt-config.py 
    -myUserConfigFile userConfigFile -myUserKeyFile userKeyFile 
    -myURL AdminServer_t3_url -partitionName partitionName 
    -rgName resourceGroupName -isCluster true_or_false 
    -middlewareHome middlewareHomeDir
    

    Both scripts require the command options described in Table 25-1.


    Table 25-1 Required Options for Advanced Web Services WLST Scripts

    Option Description

    -myUserConfigFile

    Name of the file that you specified for the userConfigFile argument when you executed the storeUserConfig WLST command in Step 3. This file stores the user configuration.

    -myUserKeyFile

    Name of the file that you specified for the userKeyFile argument when you ran the storeUserConfig WLST command in Step 3. This file stores the key information that is associated with the specified user configuration file.

    -myURL

    T3 protocol URL for the Administration Server for the partition, for example t3://host:port.

    -partitionName

    Name of the partition in which the resources are being configured.

    -rgName

    Name of the resource group in the partition.

    -isCluster

    Argument that indicates if the partition is in a cluster. Valid values are:

    • true: Partition is in a cluster.

    • false: Partition is not in a cluster.

    -middlewareHome

    Location of the directory that you specified as the Oracle home directory when you installed WebLogic Server.


Configuring Web Services: Using Partitioned Distributed Topics with SOAP over JMS

SOAP over JMS supports both queues and topics as the JMS destination type. The type that you use is determined by the application.

When using a uniform distributed topic as the request destination for SOAP over JMS in a WebLogic Server MT environment, you must use a partitioned uniform distributed topic.

In WebLogic JMS, you can configure distributed topics as replicated distributed topics or partitioned distributed topics. While replicated distributed topics work with topicMessageDistributionMode settings of Compatibility, One-Copy-Per-Server, or One-Copy-Per-Application, partitioned distributed topics work only with One-Copy-Per-Server or One-Copy-Per-Application.

To configure a partitioned uniform distributed topic for SOAP over JMS in WebLogic Server MT, configure the @JMSTransportService annotation, and set the topicMessageDistributionMode configuration property on the activationConfig property to One-Copy-Per-Server or One-Copy-Per-Application. The Compatibility value is not supported for partitioned distribution topics.

For example:

@JMSTransportService(targetService="poNotifyService" 
              , 
destinationName="com.oracle.webservices.jms.SoapJmsRequestTopic" 
              , destinationType=JMSDestinationType.TOPIC 
              , activationConfig = 
"topicMessagesDistributionMode=One-Copy-Per-Application" 
              , jndiURL = "t3://@wls-server@" 

For more information, see "Using SOAP Over JMS Transport" in Developing JAX-WS Web Services for Oracle WebLogic Server.

Note:

You must configure the JMS topic before deploying the SOAP over JMS application using the partitioned distributed topic. For more information, see "Configuring Partitioned Distributed Topics" in Administering JMS Resources for Oracle WebLogic Server.

Configuring Web Services: Related Tasks and Links

See the following for additional information related to advanced web services: