how to receive File (.EDI,.pdf....) over AS2

Hello,

Currently we are forced to receive messages from a partner in AS2 with the following “content type” : Content-Type: application / octet-stream
Content-Transfer-Encoding: binary

Example header received from Partner:


Date: jeu., 10 mars 2016 11:52:55 UTC
Authorization: Basic YW5wdXNlZddnB1c2Vy
content-length: 707
Message-ID: 12323@ZER
Subject: MTNET
Mime-Version: 1.0
Content-Type: application/octet-stream
Content-Transfer-Encoding: binary
Disposition-Notification-To: md@company.com
Content-Disposition: attachment; filename=“test.edi”
AS2-From: MTNET
AS2-To: MOC
AS2-Version: 1.1

actualy wwhene we use content-type : application/edifact application/txt … we can receive the mssage and it content stream, but the problem is that he partner can only send files over as2 with content_type:
Content-Type: application/octet-stream
Content-Transfer-Encoding: binary

is there a solution for this problem, such as developing a flow service java or use a workaround

thanks in advance ,
Omar Benrouijel

You can use User Process Payload Service.
Create a service that will be used to handle such payload,

on IS admin page, solution>EDIINT>Configuration, set value with your service name for User Process Payload Service.

you should have a Stream object in the pipeline which contains the payload once it’s triggered.

Hello ,

thank for your answer :slight_smile:

actualy we use that solution for receiving content-tyoe: application/txt and application/edifact in same time

for the content- type: application /octet-stream we do receive the stream in variable named: "contentStream " and not in variable “stream” ,so we cant find the the paylod of the message .

the problem is that we cant use two ediint process services in same time because we do receive stream in variable named “stream”.

how can we receive : application/octet-stream (contentStream) application/edifact (stream) application/txt (stream) in same time in same service

Hello,

we do receive stream using contenstream as imput variable for the gatwayservice , we change the content type of the ediint receive from application/octet-stream to application/edifact .

the message is processed by webMethods … without any porbleme .

but now the probleme we got is that the MDN sent to the partenar is in html format and not text/plain

in the webMethods consol we can see that the MDN is sent in text/plain format and that all is ok ,
but the partner still receive the MDN in html format

i creat new gatway service juste to process the ediind receive the partner still receive the html mdn.

Do you have eany idea on how we can solve that probleme or customize the mdn …

thaks in advance !

Hi,

to make the custom services work like ediint receive service, update the wm.EDIINT.receiverURL at B2B configurations .

once you update the b2b configuration, you will get all the required pipeline in custom services also.

Hello,
Thank you for your answer .

do i have make the exacte copie of the ediint receive service with new service name ?

hello,

i need to know why do the MDN is sent in html format and not in txt/plain !

thank for all

We solved the problem finaly:

Solution:

register the content handler with EDIINT module using the service wm.EDIINT.util:addContentType.

Thanks in advance

1 Like