|
|
This component
allows you receive data messages securely and reliably using the AS2
(Applicability Statement 2) specification, an optionally encrypted and/or
optionally signed SMIME based protocol, received via HTTPS or HTTP.
Messages can be processed synchronously by waiting for the component to finish
blocking on receipt of a message, or asynchronously by handling the
OnReceiveMessage event.
AS2 is the definitive new messaging standard for secure message exchange over
the Internet, based upon certificate securiity and the S/MIME protocols. It
enables the sender of a message to know that a message has been delivered
successfully, the receiver to know that the message definitely originated from
the apparent sender, and both parties to know that the message was not
interfered with or corrupted in transit. Where appropriate the message can be
securely encrypted. AS2 is essentially HTTP based, enabling messages to be sent
synchronously and directly.
It is impractical and undesirable to expose SQL Server Integration Services
packages directly onto the Internet, and so a separate AS2 Gateway application
is provided which installs under Microsoft Internet Information Services (IIS).
This Gateway Application receives AS2 messages and places them into a messaging
database, from where they can be picked up for processing by the AS2 Receive
component. This is the same messaging database fomat also used by the Web
Service and MLLP components.
The AS2 Gateway can be downloaded from the Downloads Area, and requires
Microsoft Internet Information Services version 5.1 or later.
Configuration
The gateway is configured by running the BlueSSIS AS2 Gateway Configuration
utility, found in the BlueSSIS AS2 Gateway Program Group of the Start menu after
installation and shown below :
Essentially you select or create an associated messaging database, plus the
certificate to be used for signing receipts, a response email address (which
should be human monitored) and
optionally a set of certificates defining the parties from whom you are prepared to accept messages.
The first time you run this utility you should click Select.. and then follow
the prompts to create a new Messaging database. This has to be hosted on a
SQL Server instance. Note that this is the same database format used
for MLLP and web service messages and can be shared between components.
The
ASP.Net account under which the BlueSSIS
AS2 Gateway runs (NetworkService by default) will need access to the
selected database. This account will also need
access to any certificates used for signing or decryption - follow the link from
the Configuration form for an easy way of assigning these rights. All
certificates used by the AS2 Gateway need to be in the LocalMachine/My,
LocalMachine/TrustedPeople or LocalMachine/AddressBook stores. Please
refer to the AS2 Send Component help for assistance in using the certificate
selection tool.
You can also use this application to view the currently queued, processed and
failed messages from the messaging database, by clicking the 'View
Messages...' link.
Note that the AS2 Gateway is only required in order to receive AS2 messages -
outgoing messages are sent directly onto the Internet. Also note that any number
of AS2 Gateways may be installed (for load balancing or redundancy purposes
etc.), but only one per web server.
Component Configuration
The AS2 Receive component
for SQL Server Integration Services is configured in the usual way by dragging it onto a SQL Server
Integration Services control flow surface, and then double-clicking to display
the Configuration form.
The
initial tab (above) allows you to set the variable into which the received message
will be placed by choosing the Message variable,
and optionally you can also choose a Message Id variable into which the
identifier of the message will be placed, and a Headers variable into
which any HTML headers will be placed.
Note - messages are generally assumed to be in text form unless your Message
variable is of type Object, in which case the message is retrieved as a binary
array (byte[]). Conversion between text and binary representations is
performed as required according to the Encoding property, accessible only
through the SQL Server Integration Services Property window.
You must select a Database connection to a messaging database, which must
refer to the same database as has been configured for the AS2 Gateway.
Message Filtering
You determine which messages from the messaging database are retrieved by the
component by specifying filter settings. You can specify specific criteria
in relation to From and Subject fields, any ClientId parameter placed on the
URL, and the signature of the received message. These criteria can be
literal text or if prefixed by an @ character can relate to variables.
Subject and ClientId matches are containment based. Messages are processed
in strict order of receipt.
Timeouts
The Timeouts tab enables you to configure how long your component will wait to
receive an AS2 message.
There are two modes of operation - synchronous and asynchronous. In
synchronous mode the task effectively blocks until a file is received, whereupon
it completes and linked tasks can execute. In asynchronous mode you would
typically handle the OnReceiveMessage event
exposed by the component to handle messages as they arrive. This event has
no parameters, as the received message is already bound to a variable.
The Delay between poll attempts field allows you to configure the number
of seconds between successive checks on the messaging database to determine if
any matching messages have arrived. The Get timeout field is the
total number of seconds for the component to wait for a message to arrive before
giving up. The Fail task on Get timeout option allows you to
determine if such a state should trigger a failure of the component.
Otherwise you can check if a file was retrieved by checking the Message variable
(which will have empty content if no message was retrieved) or using the
ExecValueVariable result.
0 and -1 are special cases for Get timeout, relating to a zero or
infinite timeout respectively. In the case of a zero timeout, this means
that the component will not wait if there is no message waiting in the messaging
database.
Note that you can also execute this task within a Foreach Loop Container task, to execute the contained tasks once for every file retrieved. Simply select 'BlueSSIS +AS2 Message Enumerator' as the Enumerator, then click the 'Configure...' button to configure the properties.
BlueSSIS provides a number of enumerators, mostly mapping to associated data retrieval tasks, but also including an Infinite Loop enumerator (useful for manual polling scenarios).
|
|
|
|
|