AS4Handler.ashx
AS4Handler.ashx
Parameters which can be used in the url for the AS4 Handler:
- formatType (string)
- This parameter can be used to set the FormatType for the incoming document
- This parameter can be used to set the DocumentType (DistributionObject) for the incomin document
- This parameter can be used to let the AS4 Message go directly through Link and attachments, message-properties, etc. is used again in the AS4SendAdapter (see AS4). This is currently only used for the EU AS4 e-SENS connectivity- and conformance test. But maybe there are other useful scenarios also.
How to setup AS4 receive in Link (Receiving)
- Create a new universal Conversion Table with the name: AS4IncomingUsermessages
- The conversion table must be marked as "Universal"
- Create the following columns:
Column Name | Possible values | Comment |
---|---|---|
PartnerToEdiPortalId | 00000000-0000-0000-0000-000000000000 for non-partner-specific row - otherwise the EdiPortalId for the partner | See documentation below |
MustBeSigned | True/False | |
MustBeEncrypted | True/False | |
ResponseType | Response/Callback | |
ResponseCallbackUrl | The url which should receive an async response/receipt | Only used if ResponseType is set to Callback |
IsAgreementRequired | True/False | See documentation below |
- Create a new row in the "Values" tab with the default fall-back values.
- Mark the row as "Default"
- The value of the PartnerToEdiPortalId column must be an empty guid: 00000000-0000-0000-0000-000000000000
- If field "IsAgreementRequired" is set to true the received document will fail if it does not contain a value for AgreementRef OR the agreement is not found.
Now for each external partner that have specific requirements go into the "Partner Specific Values" tab and fill out the required information.
In the PartnerToEdiPortalId column you must enter the EdiPortalId for the internal partner, which there should be sent to.
See this setup as a distribution with an ingoing transport-location configuration.
Setup the identification mapping XML file
See also: Configurations Keys
Because the internal Link identification types are limited in both lenght (db column length) and because we only have a "Name" and no combination of "DisplayName" and "Value" - we have decided that this mapping is done in a separate file. The path to this file is set in the appSettings of the web.config of the receive-site.
Name of the key is: AS4XmlIdentificationSettingsPath
Example of the content of that file
<?xml version="1.0" encoding="utf-8" ?>
<AS4Identification>
<AS4IdentificationTypes>
<AS4IdentificationType>
<From>GLN</From>
<To>GLN</To>
</AS4IdentificationType>
<AS4IdentificationType>
<From>somethingelse:prod:blah</From>
<To>GLN</To>
</AS4IdentificationType>
<AS4IdentificationType>
<From>yihaaa:blah:pippi:langstrompe</From>
<To>CVR</To>
</AS4IdentificationType>
</AS4IdentificationTypes>
</AS4Identification>
A simple mapping XML structure which takes a From and a To value.
For more information about this and what the value can be, see this section: http://docs.oasis-open.org/ebxml-msg/ebms/v3.0/core/os/ebms_core-3.0-spec-os.html#5.2.2.eb:Messaging/eb:UserMessage|outline (eb:Messaging/eb:UserMessage/eb:PartyInfo/eb:From/eb:PartyId)
NB: The reason for not using a ConversionTable for this is, that we don't have the DataownerId at this point in the flow.
MessageProperties
As a part of the AS4 protocol it must be possible to provide som dynamic meta-data to an AS4 message. This is done in the MessageProperties element in the SOAP header: (https://docs.oasis-open.org/ebxml-msg/ebms/v3.0/profiles/AS4-profile/v1.0/cs02/AS4-profile-v1.0-cs02.html)
This is accomplished in Link by a textfield on the AS4 transport location.
The content of this textfield must follow the following structure:
[key]=[value]##[key]=[value]##[key]=[value]
Example:
finalRecepient=system2##originalSender=system14##somethingCompletelyDifferent=theValueOfThis
Content on this page: