Installing Upgrading Designing Configuring Deploying Monitoring Administering Troubleshooting Reference JBI Components
Close Print View
Configuring: Sample Code for Outbound Mode:
 

Classic Java CAPS

Configuring JMS Clients

Configuring Java CAPS for SSL Support

Configuring Java CAPS Business Processes

Configuring Environment Components for the Sun Business Process Manager

Configuring Sun Master Indexes (Repository)

Configuring Java CAPS Project Components for Application Adapters

Configuring Java CAPS Project Components for Communication Adapters

Configuring Java CAPS Project Components for Database Adapters

Configuring Java CAPS Project Components for Web Server Adapters

Configuring Java CAPS Environment Components for Application Adapters

Configuring Java CAPS Environment Components for Communications Adapters

Configuring Java CAPS Environment Components for Database Adapters

Configuring Java CAPS Environment Components for Web Server Adapters

Configuring JDBC/ODBC Drivers

Configuring SAP R/3 for the SAP BAPI Adapter

Configuring Secure Network Communications for SAP

Configuring Siebel EAI Workflows

Importing an SNA Custom Handshake Class

To Import an SNA Custom Handshake Class

Steps when Building your own Class:

Deploying an SNA Custom Handshake Class

Sample Code for Inbound Mode:

Sample Code for Outbound Mode:

Configuring WebLogic for Asynchronous Communication

Configuring Master Index (Repository) Connectivity and Environments

Related Topics for Sun Adapter for Batch/FTP

Java EE Based Components

Broadcasting Master Index Updates to External Systems

Configuring Sun Master Indexes

Sample Code for Outbound Mode:

package com.stc.connector.snalu62.api;

import com.stc.connector.logging.LogFactory;
import com.stc.connector.logging.Logger;

import com.stc.connector.snalu62.exception.SNAApplicationException;

/**
 * This is a sample class to implement the interface SNACustomerHandshake.
 * It implements a simple Initialize_Conversation scenario for windows platform.
*/
public class SNACustomerHandshakeImplSampleInitialize implements SNACustomerHandshake {
    public static final String version = "cvs $Revision:
 1.1.2.1.2.2 $   $Date: 2005/11/10 21:40:15 $";
    private Logger logger = LogFactory.getLogger("STC.eWay.SNALU62." + getClass().
getName());
    private String logMsg;

    /**
     * Constructor
     *
     */
    public SNACustomerHandshakeImplSampleInitialize() {
        super();
    }

    /**
     * @see com.stc.connector.snalu62.api.SNACustomerHandshake#startConversation
(com.stc.connector.snalu62.api.SNACPICCalls)
     */
    public void startConversation(SNACPICCalls cpic) throws SNAApplicationException {
        try {
            //do whatever checking logics before/after the following CPIC call on your
 desires
            cpic.cminit();

            //do whatever checking logics before/after the following CPIC call
 on your desires
            cpic.cmssl();

            //do whatever checking logics before/after the following CPIC call on your
desires
            cpic.cmallc();
            if (!cpic.getConversationAttributes().returnCodeIs(0)) { // 0: CM_OK
                logMsg = "SNACustomerHandshakeImplSampleInitialize.
startConversation(): The return_Code is <"
                    + cpic.getConversationAttributes().getReturnCode()
                    + ">. SNA conversation is not established.";
                logger.error(logMsg);
                throw new SNAApplicationException(logMsg);
            }

            //do whatever other logics on your desires here
            //...
        } catch (Exception e) {
            logMsg = "SNACustomerHandshakeImplSampleInitialize.startConversation(): 
Failed. Got exception ["
                + e.toString()
                + "].";
            logger.error(logMsg, e);
            throw new SNAApplicationException(logMsg, e);
        }

    }

}