Sun ONE logo      Previous      Contents      Index      Next     

Sun ONE Integration Server B2B 3.6.2 Update 1, ECXpert Support for AS2 Messaging

Chapter 1
Getting Started with AS2 Messaging: Installation and Configuration

This guide describes Sun™ Open Net Environment (Sun ONE) Integration Server B2B Edition 3.6.2 (ECXpert) support for Applicability Statement 2 (AS2). It provides the information you need to understand, install, and configure ECXpert for AS2 messaging. It covers the following topics:

This document assumes that you are familiar with basic reliability and security concepts and that you have some understanding of the transport protocols involved.


Overview

Large-scale retailers are increasingly implementing AS2 trading solutions to eliminate their need for value-added networks (VAN). A VAN is a private network provider that companies hire for monthly and per-character fees to transport their business documents to and from trading partners. With the ubiquitous use of the World Wide Web, the internet is often a more cost-efficient way for companies to move their data. However, there have been security, reliability, and non-repudiation challenges. AS2 is fast becoming the business document transport protocol for large retailers because it meets these challenges by offering:

The AS2 specification describes how to exchange business data securely and reliably using HTTP as an underlying transport. The data is packaged using standard MIME content types so you can use XML, EDI, binary data, and any other data describable in MIME. Message security (authentication, confidentiality) is implemented using S/MIME. Message reliability is enabled through the use of MDNs. Nonrepudiation and Nonrepudiation of Receipt are business/legal concepts that build upon the security and reliability components in AS2.

This section provides background for understanding AS2’s role with respect to Sun ONE Integration Server B2B Edition 3.6.2 (ECXpert) and describes high-level architecture and process flow for the Sun ONE AS2 implementation.

ECXpert and Its Communications Agents

Trading partner applications send data files via ECXpert using their native messaging protocols, for example, FTP, HTTP, JMS, ebXML, SMTP, or AS2. ECXpert itself does not interpret all the different protocols. It uses inbound and outbound Communications Agent components as interpreters as illustrated in Figure 1-1.

On the inbound side, the appropriate Communications Agent accepts the message, extracts the data within it, and submits the data to ECXpert for processing. After processing the submitted data, ECXpert passes the data and messaging parameters to the outbound Communications Agent. The outbound Communications Agent constructs a message in the protocol appropriate for the receiving application using the messaging parameters, and then transmits the message according to the rules of that particular protocol.

Figure 1-1  ECXpert’s Messaging System

Block diagram of ECXpert's messaging system.

As with all of the Communications Agents, the AS2 feature provides two agents: an inbound, or receive, Communications Agent and an outbound, or send, Communications Agent. The rest of this section describes these Communications Agents.

Receiving and Sending AS2 Messages

AS2 receive processing depicted in Figure 1-1 starts when the HTTP/AS2 Protocol Listener (or Protocol Listener) receives an AS2 message via HTTP POST from the remote trading partner. The receive processing ends when the AS2 Inbound Communications Agent submits the message payload to ECXpert core processing for parsing, translation, and routing as required.

The Protocol Listener is implemented as a servlet. Its job is to process inbound HTTP POST requests sent by the trading partner application. The AS2 Inbound Communications Agent handles all the details of the AS2 protocol processing. It authenticates the message, decrypts it if it is encrypted, and performs MDN generation and reconciliation if required before passing the business data to ECXpert.

The send processing starts as a response to an event, such as submitted data or a scheduled event. Referring to Figure 1-1, after ECXpert completes processing business data to transmit using AS2, it passes the data to the AS2 Outbound Server (a component of the AS2 Outbound Communications Agent). Based on outbound AS2 partnership parameters, the Outbound Server constructs a valid AS2 message with the appropriate type and MDN request attributes. The payload is encapsulated inside an AS2 message envelope. The message is optionally signed, encrypted, or signed and encrypted. The Sending Agent sends the message to trading partner.

Throughout its operation, the Outbound Server uses its logging interface to record events to the ECXpert Event Log, which you can access through ECXpert’s Tracking page under the Event Log tab.


Setting Up the AS2 Plug-in

As the AS2 administrator, you perform the following tasks to install the AS2 Communications Agent:

  1. Configure your Sun ONE Web Server for use with the AS2 plug-in by creating and configuring a Sun ONE web server instance.
  2. Run the install program. This installs the AS2 Inbound and Outbound Communications Agents and configures ECXpert to work with them.

This section provides the details for performing these tasks.

Set the following environment variables in the shell in which you will perform the installation:

Create the HTTP/AS2 Protocol Listener

Ensure that the following products are installed and running:

Configure the Sun ONE Web Server to use JRE 1.4. For the example shown in these procedures, IWS_SERVER_HOME represents /export/home/ecxadmin/iWS60SP5/.

Figure 1-2 illustrates the procedure.

    To configure the Web Server to use JRE 1.4
  1. Open the Web Server Administration Server interface from a web browser.
  2. Click the Global Settings tab.
  3. Click the Configure JRE/JDK Paths link in the list of links on the left side of the page. The resulting screen should be similar to Figure 1-2.
  4. Figure 1-2  Configure JRE/JDK Paths Screen
    Screen capture of configuring JRE/JDK paths activity.

  5. Update the JRE Path to point to your B2B 1.4 JRE.
  6. Click Ok and restart the web server as directed.
  7. Close the browser window.
  8. Restart the Web Server Administration Server using the stop and start commands in $IWS_SERVER_HOME/https-admserv. Table 1-1 lists an interactive session that stops and starts the sever.
  9. Table 1-1  Example Listing for Starting and Stopping the Web Server

     

    ecxadmin@host[85]% ./stop

    shutdown: server shut down

    ecxadmin@host[86]% ./start

    iPlanet-WebServer-Enterprise/6.0SP5 B10/31/2002 16:22

    [LS ls1] http://host.sun.com, port 5770 ready to accept requests

    startup: server started successfully

    To create the HTTP/AS2 Protocol Listener
  1. Reopen the iPlanet Web Server Administration Server interface.
  2. Click the Add Server link on the left side of the Servers tab page.
  3. See Figure 1-3 for an example of the screen.

    Figure 1-3  Add Server Screen
    Screen capture of the Add Server activity.

  4. The fully qualified server name appears by default in the Server Name field.
  5. Set the server port value to an unused port (9000 in the example).
  6. Set the server identifier to the recommended default, as2.
  7. Set the server user to the ECXpert login name (excadmin in the example).
  8. Accept the default MTA Host, localhost.
  9. Click the OK button. Figure 1-4 shows an example of the resulting screen.
  10. Figure 1-4  Add Server Success Screen
    Screen capture of the Add Server success indicator.

  11. Click the Configure your new server... link.
  12. Click the Server On button. This results in the screen shown in Figure 1-5.
  13. Figure 1-5  Server On Screen
    Screen capture of the Server On status indicator.

    To Change https-as2 Ownership
  1. Change the file system ownership of the $IWS_SERVER_HOME/https-as2 directory contents to be the same as the owner of the server instance.
  2. For example, the administrator in the example would change the owner to ecxadmin. If the file ownership is left as root, it could cause problems during deployment.

Install the AS2 Plug-In

These instructions assume that you have already downloaded the AS2 plug-in from the Sun website.

Preconditions for Installation

Ensure that the environment variables IWS_SERVER_HOME and BDGHOME are set as described on .

You need the following access information:

Table 1-2  Access Checklist

Required Information

Description

Default

ECXpert administrator login and password

Administrative ID and password required to configure ECXpert services and access membership/partnership information.

ECX, ECX

Oracle Hostname

The hostname of the machine on which the Oracle database is installed.

[hostname]

Oracle Port Number

The port number of the Oracle listener.

1521

Oracle SID

The SID for the ECXpert database.

ECX

Web Server Instance Name

The name of the web server instance you will create.

as2

    To set up the new files
  1. Uncompress and untar (on Solaris™) the installation software from the file that was downloaded into a temporary directory.
    To install the AS2 plug-in components
  1. Execute the setup.sh script located in the root of your temporary directory.
  2. You should see a listing similar to that shown in Table 1-3.

    Table 1-3  Example Listing for AS2 Installation 

     

    ecxadmin@host[94]% ./setup.sh

    ## AS2 Plugin Installer ##

    ##########################

    - B2B Configuration Settings -

    B2B Admin User [ECX]:

    B2B Admin Pass [ECX]:

    - Oracle Configuration Settings -

    Oracle Host [host]:

    Oracle Port [1521]:

    Oracle SID [ECX]: HOST

    Deploying AS2 WAR file to iWS ...

    AS2 Server Instance Name [as2]:

    [wdeploy] The war file name is /export/home/ecxadmin/ecx36/NS-apps/ECXpert/http_as2/as2.war

    [wdeploy] Deploying web application

    [wdeploy] Loading new configuration

    [wdeploy] Web application deploy successful

  3. Fill in the required information accepting defaults where appropriate up to the AS2 Server Instance Name.
  4. If you have the admin account with login and password as ECX, ECX; and Oracle is installed on the same machine, you should be able to accept all of the defaults. In the example shown above, the administrator had an Oracle SID different from the default.

  5. Fill in the server instance name. If you created the server as https-as2, then accept the default.
  6. Watch the status messages returned by the installation program. You know that the installation is a success when you see the message Web application deploy successful.
  7. The resulting directory structure is shown in Figure 1-6.

    Figure 1-6  AS2 Directory Structure
    Layout of the AS2 directory and its subdirectories and files.

The installation program installs all the necessary AS2 components in the correct directory structure locations. It configures the ecx.ini file so that the AS2 Communications Agents appear as choices in ECXpert’s Partnership Protocols Administration screen and otherwise integrates the AS2 plug-in with ECXpert.

If your AS2 usage profile requires communication through a proxy server, the use of signature and encryption, or SSL, you need to make minor modifications to one or more fields in ECXpert’s configuration file, ecx.ini. Appendix A, "ECXpert’s Configuration File (ecx.ini)" describes the fields specific to AS2.

After completing the installation procedure, you can start the system components and configure partnerships for AS2 communications.


Starting and Stopping the Servers

Because the AS2 Communications Agents are a plug-in for 3.6.2, AS2 administration differs from administration for native Communications Agents (for example, FTP, SMTP, or ebXML). The AS2-related servers will not appear in the ECXpert Administrator interface, so these servers must be manually started and stopped.

Figure 1-1 shows the servers involved for AS2 communication. They are the inbound and outbound AS2 Communication Agents, the HTTP Protocol listener that listens for inbound HTTP post messages, and the ECXpert server. The order in which you start the servers is important. If it is not done correctly, the communication fails resulting in an error message. For example, if you brought up the web server before starting the AS2 server, when the servlet tries to deliver data to the AS2 Communications Agent, the server will not be available. The web server will return errors for inbound AS2 messages until the inbound server is started.

Starting the Servers

First, start the ECXpert system so that it is ready to send and receive AS2 data. Then start the AS2 inbound and outbound servers directly from the command line. Finally, start the Web Server instance to enable the HTTP/AS2 Protocol Listener.

    To start the ECXpert server
  1. Start the main servers for ECXpert either through the command line or using the Administrative interface.
    To start the AS2 Servers
  1. Start the AS2 inbound and outbound servers using the as2-server start command in the $BDGHOME/http_as2/bin.
  2. The listing in Table 1-4 shows this step for the example.

    The AS2 Server command-line interface allows you to manually start or stop the inbound and outbound AS2 servers. Note that there is no option to start or stop only one (inbound or outbound) of the servers.

    Table 1-4  Example Listing for Starting the AS2 Servers

     

    ecxadmin@host[74]% cd $BDGHOME/http_as2/bin

    ecxadmin@host[75]% as2server start

    ecxadmin@host[76]%

    AS2 Server Bootstrap Loader v1.0

    -> Created RMI registry.

    -> Created Inbound AS2 Server.

    -> Created Outbound AS2 Server.

    -> Bootstrap Successful, Awaiting Requests...

    To start the AS2 web server instance
  1. Start the web server instance for AS2 using the start command in $IWS_SERVER_HOME/https-as2.
    To confirm that all servers are up and running

Stopping the Servers

As with starting the servers, there is a specific order in which to stop each server in the system. After shutting the servers down, ECXpert cannot receive AS2 messages.

    To stop the AS2 web server instance
  1. Stop the web server instance for AS2 using the stop command in $IWS_SERVER_HOME/https-as2.
  2. Verify that the AS2 Inbound Communications Agent is not performing any work. One way to do this on Solaris machines is to use the tail command on the log files. On Windows machines, use the Task Manager.
  3. When there is no more activity, proceed to the next step.

    To stop the AS2 Servers
  1. Stop the AS2 inbound and outbound servers using the as2server stop command in the $BDGHOME/http_as2/bin. See Table 1-5.
  2. Table 1-5  Example Listing for Stopping the AS2 Servers

     

    ecxadmin@host[68]% as2server stop

    ecxadmin@host[69]%

    AS2 Server Bootstrap Loader v1.0

    -> Server shutdown in 5 seconds!

  3. Verify that no work is currently in process on the ECXpert servers. When there is no activity, proceed to the next step.
    To stop the ECXpert server
  1. Shut down the main ECXpert servers either through the graphical user interface or the command-line interface.
    To confirm that all servers are shut down
  1. Confirm that all components have completed and are shut down by examining the AS2 logs and by confirming the processes are not in execution by running ps -ef commands in the Unix console.


Uninstalling AS2

The AS2 setup.sh --uninstall command restores the system to its preinstallation state.

    To uninstall the AS2 plug-in components
  1. Execute the following command to uninstall the Sun ONE AS2 plug-in:
  2. $BDGHOME/http_as2/setup.sh --unistall


    Note

    Before uninstalling the AS2 plug-in, delete or change the outbound protocol for any partnerships that use the HTTP AS2 protocol. Failing to do this will leave the outbound partnership parameters in an inconsistent state.



What to Do Next

After you complete the AS2 plug-in installation and start the servers, you can test the new communications agents and set up encryption and signing if you need those features.

Test the Installation

Chapter 2, "Example: End-to-End Test for AS2 Messaging" gives a detailed example for testing between sending and receiving hosts for a simple plain message. If you are familiar with ECXpert administration, you can skip that chapter. However, it is recommended that you become familiar with the fields of the new protocol screen that are now available in the ECXpert Administration interface. See Table 2-6 and Figure 2-6.

Set Up Encryption and Signing Features

To set up encryption and signing you must create certificates as described in Chapter 3, "Creating Certificates for AS2 Messaging".

For instructions on setting up SSL, refer to Sun ONE Web Server documentation at http://docs.sun.com/db/coll/S1_ipwebsrvree60_en.



Previous      Contents      Index      Next     


Copyright 2003 Sun Microsystems, Inc. All rights reserved.