Examples and Test cases

ebXML Example

The following example illustrates using FMS between two business trading partners using the ebXML V3.0 message protocol. The example takes a step by step approach in configuring, establishing a link, and communicating a business message between the producer and a consumer trading partner. The business document (invoice) is based on the Universal Business Language UBL version 2.0 format.

The example assumes that the producer machine has a TCP/IP number of 192.168.0.102 and that the consumer machine has a TCP/IP number of 192.168.0.128.

ebXML Configuration

The first step is to install FMS as discussed in the Section called FMS Installation in the Chapter called Installation. Once FMS is installed and running invoke the FMC as discussed in the Chapter called Configuring FMS. Leave any settings not included below at default or blank.

Producer Configuration

The following interface configuration steps are required on the producer side.

  1. Set up the keystore including private and public keys for the producer as per the Section called Keystore Setup and Examples in the Chapter called Installation.

  2. Open the Interface Configuration tab in the FMC and select HTTP - ebXML - UBL in the Interface Name pane.

  3. Select Enabled in the corresponding configuration form to the right.

  4. Select the required Payload Security Level eg. SIGN_ENCRYPT.

  5. Select the required Transport Security Level eg. SIGN_ENCRYPT.

  6. Select the name of the output directory eg. delivered-content.

  7. Select the Usage required eg. TEST.

  8. Only enable Non-Repudiation if the database has been installed and configured as detailed in the Section called Database Server in the Chapter called Installation.

  9. Select the ebXML RemoteIn button in the HTTP -ebXML - UBL Connections form and set the HOST attribute to the TCP/IP number of the machine on which the producer FMS is hosted eg. 192.168.0.102. Both TCP/IP V4 and TCP/IP V6 are supported. If DNS is enabled then set HOST to the domain name.

The following partner configuration steps are required on the producer side for the local partner identifier.

  1. Select partner identifier 000000000 in the Partner Identifiers pane in the Interface Configuration section of the FMC.

  2. Set the Identifier Value to Producer in the corresponding form. The partner identifier in the Partner Identifiers pane will change accordingly.

  3. Set the Partner Type to LOCAL PARTNER from the drop down list.

The following partner configuration steps are required on the producer side for the remote partner identifier.

  1. Select partner identifier 999999999 in the Partner Identifiers pane in the Interface Configuration section of the FMC.

  2. Set the Identifier Value to Consumer in the corresponding form. The partner identifier in the Partner Identifiers pane will change accordingly.

  3. Set the Keystore Alias to consumer_fmsrns.

  4. Set the Endpoint URL/MPC to the url of the remote host eg.https://192.168.0.128/ebXML.

  5. Set the Partner Type to REMOTE PARTNER from the drop down list.

The following processing mode configuration steps are required on the producer side.

  1. Select the Processing Modes pane in the Interface Configuration section of the FMC.

  2. Select the General form and set the Identifier attribute to inv-producer-consumer. This can be set to any text string but must correspond with the consumer processing mode.

  3. Set the Agreement to blank unless a CPA is required.

  4. Set the Conversation ID to 1.

  5. Set the Initiating Partner Party to Producer.

  6. Set the Responding Partner Party to Consumer.

Select the Request tab in the P-Mode Events form and ensure that the following settings are configured. Note that these are also known as P-Mode Legs.

  1. Set the protocol Address/Endpoint to https://192.168.0.128/ebXML.

  2. Set the business information Service to Service-Mapping-UBL from the drop down list.

  3. Set the business information Action to Invoice.

  4. Right click in the business information Payload Profiles field and select New to open the Payload Profile selection window.

  5. Select UBL-Invoice-2.0.xsd from the Schema File drop down list.

  6. Select application/xml from the MIME Type drop down list.

  7. Select EXPECTED from the Requirement drop down list.

  8. Select the Done button to close the Payload Profile selection window.

  9. Select the Error Handling form by scrolling down to the bottom of the P-Mode-Events request tab form.

  10. Set the Sender Errors To to https://192.168.0.102/ebXML.

  11. Set the Receiver Errors To to https://192.168.0.128/ebXML.

  12. Set all 4 Notify selections.

Once all the above has been configured select the Save button. Then select the Administration pane and load the configuartion into FMS as follows.

  1. Select the Administration menu option and select Open Admin Connection.

  2. Select the Administration menu option and select Connect to Logger.

  3. Select the Tools menu option and select Reload Connections.

Consumer Configuration

The following interface configuration steps are required on the consumer side.

  1. Set up the keystore including private and public keys for the consumer as per the Section called Keystore Setup and Examples in the Chapter called Installation.

  2. Open the Interface Configuration tab in the FMC and select HTTP - ebXML - UBL in the Interface Name pane.

  3. Select Enabled in the corresponding configuration form to the right.

  4. Select the required Payload Security Level eg. SIGN_ENCRYPT.

  5. Select the required Transport Security Level eg. SIGN_ENCRYPT.

  6. Select the name of the output directory eg. delivered-content.

  7. Select the Usage required eg. TEST.

  8. Only enable Non-Repudiation if the database has been installed and configured as detailed in the Section called Database Server in the Chapter called Installation.

  9. Select the ebXML RemoteIn button in the HTTP -ebXML - UBL Connections form and set the HOST attribute to the TCP/IP number of the machine on which the consumer FMS is hosted eg. 192.168.0.128. Both TCP/IP V4 and TCP/IP V6 are supported. If DNS is enabled then set HOST to the domain name.

The following partner configuration steps are required on the consumer side for the local partner identifier.

  1. Select partner identifier 000000000 in the Partner Identifiers pane in the Interface Configuration section of the FMC.

  2. Set the Identifier Value to Producer in the corresponding form. The partner identifier in the Partner Identifiers pane will change accordingly.

  3. Set the Keystore Alias to producer_fmsrns.

  4. Set the Partner Type to REMOTE PARTNER from the drop down list.

The following partner configuration steps are required on the consumer side for the remote partner identifier.

  1. Select partner identifier 999999999 in the Partner Identifiers pane in the Interface Configuration section of the FMC.

  2. Set the Identifier Value to Consumer in the corresponding form. The partner identifier in the Partner Identifiers pane will change accordingly.

  3. Set the Partner Type to LOCAL PARTNER from the drop down list.

The following processing mode configuration steps are required on the consumer side.

  1. Select the Processing Modes pane in the Interface Configuration section of the FMC.

  2. Select the General form and set the Identifier attribute to inv-producer-consumer. This can be set to any text string but must correspond with the producer processing mode.

  3. Set the Agreement to blank unless a CPA is required.

  4. Set the Conversation ID to 1.

  5. Set the Initiating Partner Party to Producer.

  6. Set the Responding Partner Party to Consumer.

Select the Request tab in the P-Mode Events form and ensure that the following settings are configured. Note that these are also known as P-Mode Legs.

  1. Set the protocol Address/Endpoint to https://192.168.0.102/ebXML.

  2. Set the business information Service to Service-Mapping-UBL from the drop down list.

  3. Set the business information Action to Invoice.

  4. Right click in the business information Payload Profiles field and select New to open the Payload Profile selection window.

  5. Select UBL-Invoice-2.0.xsd from the Schema File drop down list.

  6. Select application/xml from the MIME Type drop down list.

  7. Select EXPECTED from the Requirement drop down list.

  8. Select the Done button to close the Payload Profile selection window.

  9. Select the Error Handling form by scrolling down to the bottem of the P-Mode-Events request tab form.

  10. Set the Sender Errors To to https://192.168.0.102/ebXML.

  11. Set the Receiver Errors To to https://192.168.0.128/ebXML.

  12. Set all 4 Notify selections.

Once all the above has been configured select the Save button. Then select the Administration pane and load the configuartion into FMS as follows.

  1. Select the Administration menu option and select Open Admin Connection.

  2. Select the Administration menu option and select Connect to Logger.

  3. Select the Tools menu option and select Reload Connections.

Sending an Invoice

Once the above configuration settings have been made using the FMC and subsequently loaded into FMS, business documents corresponding to the configuration settings can be communicated from the producer trading partner to the consumer trading partner. This may be achieved using the fms-client utility from the FMS installation directory as follows.

\
\java -jar client/fms-client.jar -c inv-producer-consumer -d consumer -e request \
\  -f test/UBL/xml/UBL-Invoice-2.0-Example.xml -P 29450 -O finest
\
\        

where the client utility command line options are described in the Section called Invocation in the Chapter called RosettaNet/ebXML Application Configuration.