none
Trading Partner is not receiving AS2 Default content type as expected RRS feed

  • Question

  • My question is regarding the content type for AS2. The content type needs to be application/EDI-X12. To set this I am  going to the AS2 properties of that trading partner and setting Default Content type: APPLICATION/EDI-X12 from Party as Message Receiver. After setting this the trading partner says that they are still receiving Content-Type: text/xml; charset="UTF-8". The send port is included in the send ports of the party and the SendPipeline is AS2ediSend, so my understanding is that this is all that is required to do this. Any advice would be greatly appreciated.

    Monday, May 10, 2010 8:02 PM

Answers

  • I am not sure if this is the best way, but I was able to get past this and thought I would post it. I changed from AS2EDISend Pipeline to a custom pipline that has the EDI assembly, AS2 Encode and a custom component. In that component I set the content type.

    inmsg.BodyPart.ContentType =

    "application/EDI-X12";

    • Marked as answer by JohnBon Friday, May 14, 2010 4:31 PM
    Friday, May 14, 2010 4:31 PM

All replies

  • The documentation says "If the ContentType property is set in the context for a message body part, that setting is used to generate the outgoing message; otherwise, the value of this Default content type property is used."

    Can you stop the Send Port and check out if the Message Context properties contain AS2PayloadContentType or not. 

    Also, make sure to restart the Host Instance after making changes to Party settings.

    Atin Agarwal


    Atin Agarwal
    Monday, May 10, 2010 10:27 PM
  • Atin,

     Thanks for your response. I stopped the send port and the contnent type is "text/xml" within the Message Parts. When I highlight Context I do not see a AS2PayloadContentType property. My solution is receiving the IDOC as XMLReceive, mapping the xml to the X12 schema in the send port and then applying the AS2EDISend Pipeline. So, I believe the message I am looking at is prior to the EDI Assembly or AS2 encoding, which would explain why I do not see this property. However as am not setting the ContentType property directly, I should be able to use the Default context type. Does that sound correct?

     

    Wednesday, May 12, 2010 2:12 PM
  • I am not sure if this is the best way, but I was able to get past this and thought I would post it. I changed from AS2EDISend Pipeline to a custom pipline that has the EDI assembly, AS2 Encode and a custom component. In that component I set the content type.

    inmsg.BodyPart.ContentType =

    "application/EDI-X12";

    • Marked as answer by JohnBon Friday, May 14, 2010 4:31 PM
    Friday, May 14, 2010 4:31 PM
  • In addition to your message, its probably worth mentioning that the custom component step should appear just before the AS2 encoder.

    M.Sc. Software Engineer

    Friday, January 25, 2013 10:31 AM