Blog

Managed File Transfer and Network Solutions

The Quickstart Guide To Setting Up An AS2 Server

Posted by John Carl Villanueva on Tue, Nov 24, 2015 @ 02:58 PM

Overview

In this tutorial, we walk you through the basic steps of setting up an AS2 server. These are the initial steps that will eventually allow you to carry out EDI transactions with an increasing number of trading partners already using this popular B2B file transfer protocol. 

The_Quickstart_Guide_to_Setting_Up_An_AS2_Server.jpg

The steps you're about to follow will be done on JSCAPE MFT Server, a managed file transfer server that, in addition to AS2, also supports several other file transfer protocols like FTP/S, HTTP/S, OFTP, AFTP, and SFTP. JSCAPE MFT Server already comes with a powerful automation feature called Triggers, which enables admins to automate a variety of business processes, making it the perfect solution for carrying out EDI transactions.

You may download a free, fully-functional evaluation edition of JSCAPE MFT Server here:

 

 Download Now

 

Setting up HTTP/S

AS2 runs over HTTP or HTTPS. So before you start configuring any AS2 settings, you'll need to have an HTTP or HTTPS service up and running on your server. The article "How To Set Up A Web File Transfer" should be able to help you with that. We also have a similar article that focuses more on the secure version of HTTP, HTTPS: How To Set UP A HTTPS File Transfer.

Once you have your HTTP/S service all powered up, you can then begin enabling AS2.

Enabling AS2

Assuming HTTP/S is already up, the first thing you've got to do is enable AS2 on the server. In the JSCAPE MFT Server Manager main screen, go to Server > Settings

 

server-settings-menu-mft-server.png

 

Next, go to the Web menu and then to the AS2 tab. Tick the checkbox labeled Enable AS2

 

server_settings_web_enable_as2.png

 

Skip the other settings for now and go directly to the checkbox labeled "Bind unauthenticated transfers to user". Tick that check box as well. After that, enter the username of an existing user account in the first field and the name of an existing domain (in which this user belongs) in the second field. An initial domain should have been created when you first installed JSCAPE MFT Server, so you may use that domain here. 

All files/EDI messages received from other AS2 servers will be automatically saved into a folder under this particular user account. In this example, we called this user as2user. 

 

as2_bind_unauthenticated_users_to_as2user.png

 

Next, we need to specify the folder where AS2 messages received from other AS2 servers will be stored. Enter the path of that folder in the Upload directory field. Note that this is a relative path that will be located under the bound user account's root directory. This doesn't have to be an existing folder. JSCAPE MFT Server will automatically create the folder for you.  

As soon as you're done, navigate to the bottom-right corner of that screen and click the Save changes button

  

save_changes_as2_server.png 

After the page reloads, you should be back at the main screen. Click the Domains tab and then double-click the domain you specified earlier. In our example, that would be "mftserver1". 

 

mftserver_domain_for_as2.png

 

Alternatively, you could also select that domain and then click the Edit button found in the bottom-right corner of the screen. 

 

edit_mft_server_domain-1.png

 

Once inside the domain, go to the Services menu and then click the Add button. 

 

add_as2_service.png

 

Select AS2 from the drop-down list and then click OK

 

add_as2_service_protocol.png

When the next screen pops up, click OK again. 

 

as2_http_https_ok.png

 

You should then see your newly added AS2 service in the Services tab. 

 

newly_added_as2_service.png

 

You have just configured all the basic settings for receiving AS2 messages. We now proceed to discuss the settings for sending AS2 messages.

 

Configuring Trading Partner settings for sending AS2 messages

 

In JSCAPE MFT Server, AS2 messages are sent via what are known as Trading Partners. Trading Partners are special objects in the JSCAPE MFT Server environment that encapsulate all the necessary information of an actual trading partner. If you want to learn more about trading partners, here are a couple of introductory videos and articles. 

Using Trading Partners in JSCAPE MFT Server - Part 1

Using Trading Partners in JSCAPE MFT Server - Part 2

Preparing Trading Partner Servers For SFTP Automation

How To Set Up A Scheduled Automatic Download With A Trading Partner

 

Let's start setting up our AS2 trading partner. 

In the same domain where you added the AS2 service, navigate to the Trading Partners menu and then click the Add button. 

 

add_as2_trading_partner.png

 

Notice that a trading partner using the AS2 protocol already exists in our list. In a production environment, you'll likely have multiple AS2 Trading Partners, with each Trading Partner  pointing to a distinct company whom you transact with.

Select the AS2 protocol from the drop-down list and then click OK

 

as_protocol_trading_partner.png

When the AS2 Trading Partner dialog box appears, enter the necessary information. This would include:

  • Your desired name for this trading partner (e.g. 'ABC Company TP-AS2')
  • The URL of your trading partner's AS2 service (e.g. https://192.168.100.102:443/as2/incoming). Ask your trading partner for this piece of information .
  • The From ID - This can be any alpha-numeric value (no spaces) that uniquely identifies where the AS2 message is coming from.
  • The To ID - Like the From ID, this can be any alpha-numeric value (no spaces) that uniquely identifies where the AS2 message is being sent to. 

In a production environment, you will of course need to enter several other information than just those four. However, this is the bare minimum you need to start exchanging AS2 messages with a test system. 

 

as2_trading_partner_parameters.png

 

as2_trading_partner_parameters_2.png

 

After clicking OK, you should see your newly created AS2 Trading Partner in your list of Trading Partners. 

 

newly_created_as2_trading_partner.png

 

Now that you've configured your server to send AS2 messages to a trading partner, you might want to try sending messages now. 

 

Sending AS2 messages manually

 

JSCAPE MFT Server has a built-in feature that allows you manually send AS2 messages. Let's try it out. Navigate to the AS2 Messages menu and then click the Send File button. 

 

as2_messages_send_file.png 

 

Select the Trading Partner you created earlier and then browse to a file you want to upload. After selecting the file click OK

 

send_as2_file.png

 

After a few seconds, you should see two new records on your AS2 Messages list. One for the outgoing AS2 transmission and another one for its corresponding AS2 MDN receipt

 

newly_sent_as2_message_plus_receipt.png

 

Let's zoom in on that a bit.

 

zoom_newly_sent_as2_message_plus_receipt.png

 

Of course, while it's possible to send EDI messages manually, it's not the ideal way. In order to take full advantage of EDI, EDI messages must be sent automatically. We're going to show you how to do that on our next post, so stay tuned for it.  

In the meantime, why don't you try this out yourself? Download a free, fully-functional evaluation edition of JSCAPE MFT Server now. 

Download Now

 

 

Topics: JSCAPE MFT Server, Managed File Transfer, Business Process Automation, AS2