Dynamic Discovery allows you to define Sending Processing Modes that do not contain all the specific routing information.

The Sending Processing Mode that is used to send an AS4 Message is dynamically decorated with the required routing information by the AS4 MSH during the send operation.

Dynamic Discovery makes it possible to have fewer Sending Processing Modes:

Instead of having full blown Sending Processing Modes, Dynamic Discovery allows you to have fewer 'incomplete' Sending Processing Modes that act as a template. The missing routing information will be dynamically added by the AS4.NET MessageHandler when an AS4 Message is being sent. When appropriate, using Dynamic Discovery can save you time since there are fewer Sending Processing Modes to maintain.

How does Dynamic Discovery work

When Dynamic Discovery is enabled in the Sending Processing Mode, AS4.NET will attempt to decorate the Sending Processing Mode with routing information that is retrieved from an SMP server (_Service Metadata Publisher).

The Sending Processing Mode defines the SMP Profile that must be used to retrieve the routing information. If there's no SMP Profile specified, AS4.NET will use a default profile where AS4.NET itself will act as an SMP server. In this case, AS4.NET will retrieve routing information from its own routing table and will complete the Sending Processing Mode with this information. Any routing information that is already defined in the Sending Processing Mode will be overwritten during this operation!

In AS4.NET, Dynamic Discovery is supported in both receive/forward/send scenario's and in regular submit/send scenario's:

Any existing routing information that might already present in the Sending Processing Mode will be overwritten!

Retrieve Routing Info During Sending or Forwarding

AS4.NET will query the SMP profile (default or custom) to retrieve the routing information that must be used to complete the Sending Processing Mode.

This information will be retrieved based on the ToParty information; this means that AS4.NET must know the identifier of the ToParty to determine the routing information.

  • During Sending, the routing information is retrieved from either the SubmitMessage or the Sending Processing Mode. The SubmitMessage's ToParty is used when the Sending Processing Mode has set the AllowOverride to true; otherwise the ToParty from the PMode is used.

Note that the Dynamic Discovery will fail if the Sending Processing Mode has set the AllowOverride to false and the SubmitMessage contains a ToParty that's different from the Sending Processing Mode ToParty.

  • No labels