Saturday, January 12, 2008

Receiving AS2 MDN in BizTalk Orchestration

Having an AS2 port setup in an orchestration is easy to configure a one-way send port. However, configure a request-response send-port is a bit tricky. You probably know the message schema of the send port but you have no idea of the schema of an MDN.

You may attempt to use System.Object, System.String, or even create an MIME message type with two parts. However, none of these options work. Going through the schemas under the BizTalk EDI Application in Administration Console, you only see the property schema of EdiIntAs.EdiIntProperties and no sign for other schema for MDN.

At this moment, you will want to have a type that receiving any message. Microsoft.XLANGs.BaseTypes.Any is the savior. You can choose it from Schema > Select from referenced assembly...

5 comments:

Anonymous said...

Thanks for the post, was very useful.
But now I'm having another problem. What kind of message should I send from an orchestration, when receiving an AS2 message and need to send a MDN?
It seems that biztalk generates the MDN automaticly, but the orchestration needs to have a request-response port.
If anyone have any idea I would appreciate

Shane said...

I am not sure why you wanted to process the AS2 message in an orchestration. You can use a send port to subscribe the AS2 receive port and send the AS2 payload to a folder. Then, let the orchestration to pick up the message in the folder.

Anonymous said...

Hi

Thanks for the advice. =)
But now I'm having another problem. Although the MDN works, I wanted to sign the message and the MDN, but it always give mt this error:


An output message of the component "Microsoft.BizTalk.EdiInt.PipelineComponents" in receive pipeline "Microsoft.BizTalk.EdiInt.DefaultPipelines.AS2Receive, Microsoft.BizTalk.Edi.EdiIntPipelines, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" is suspended due to the following error:
An error occurred when validating an AS2 message. Make sure the certificates used have not timed out or been revoked..
The sequence number of the suspended message is 2.

altough the certificate are valid and the issuer belongs to a root trusted authority.

Have you got any advice?
Thanks
David Paisana

Shane said...

Hi David,

Please take a look at http://msdn2.microsoft.com/en-us/library/bb898960.aspx explaining why the error occurs. There are a few action items for you to reference, too.

Shane

Nandu said...

Awesome ! Thanks a bunch. This is a life savor for me.