locked
Getting error: It could not be classified as an X12 or Edifact message RRS feed

  • Question

  • Tag: Configure dynamic output file name from multiple source/input file name.

    I am getting target namespace error while processing through party.

     

    I have modified X12 base template of X12_00401_210 and added Root node DS_RHW_210. Schema target namespace given as http://schemas.microsoft.com/BizTalk/EDI/X12/2006Custom and selected “DS_RHW_210” as Root node.

     

    Map works perfectly, I have created an Orchestration to transform through mapping, created send port as edisend which is assigned to a party. Messages were passing through Orchestration and getting error as


    Error 1:
     

     

    "A message sent to adapter "FILE" on send port "SendPortEDI" with URI "E:\Project Files\BIZTALK\210-RESTORATION HARDWARE\FinalTest\EDIOut\%MessageID%.txt" is suspended.

     Error details: There was a failure executing the send pipeline: "Microsoft.BizTalk.Edi.DefaultPipelines.EdiSend, Microsoft.BizTalk.Edi.EdiPipelines, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Source: "EDI assembler" Send Port: "SendPortEDI" URI: "E:\Project Files\BIZTALK\210-RESTORATION HARDWARE\FinalTest\EDIOut\%MessageID%.txt" Reason: A message was encountered with root element name of DS_RHW_210. It could not be classified as an X12 or Edifact message. The root namespace was http://schemas.microsoft.com/BizTalk/EDI/X12/2006Custom 

     MessageId:  {6F2D1E93-F02C-4DC7-8782-962BD8B96854}

     InstanceID: {730709F9-7C99-41E0-99BC-04DF76141C1D}"

     

    Error 2:

    "There was a failure executing the send pipeline: "Microsoft.BizTalk.Edi.DefaultPipelines.EdiSend, Microsoft.BizTalk.Edi.EdiPipelines, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Source: "EDI assembler" Send Port: "SendPortEDI" URI: "E:\Project Files\BIZTALK\210-RESTORATION HARDWARE\FinalTest\EDIOut\%MessageID%.txt" Reason: A message was encountered with root element name of DS_RHW_210. It could not be classified as an X12 or Edifact message. The root namespace was http://schemas.microsoft.com/BizTalk/EDI/X12/2006Custom"

    Thanks.

    Tuesday, November 10, 2009 2:15 PM

Answers

  • OK,

    In order to achieve this you need to use SQL stored procedure. Batching is usually used to club the messages before it goes to send port and by that you are getting Transaction set with ISA.
    I would suggest store the inbound information in the database, if it is already done then fine.
    create stored procedure to pick the desired number of messages from the DB in xml format and then map them according. Now before your message goes to pipeline assembler stage where header information is to be added you will have multiple transaction sets and then pipeline will add the envelope.

    To get the data in xml fromat from DB use FOR XML PATH.

    -- (SELECT A,B,C,D from tablename where 'condition' FOR XMLPATH('NodeName'), BINARY BASE64, TYPE)

    Please let me know if this fits as a solution to your problem and if not why?? we will take some different approach.

    Regards
    Vishnu
    Vishnu
    • Proposed as answer by Andrew_Zhu Friday, November 13, 2009 7:57 AM
    • Marked as answer by Andrew_Zhu Tuesday, November 17, 2009 3:28 AM
    Thursday, November 12, 2009 5:40 PM

All replies

  • Hi,

    Do not change the TargetNameSpace. As you need to specify the TragetNameSpace while configuring the EDIProperties for the
    party as well under BizTalk Admin Party section or else you need to change Default TargetNamespace there as well.

    For Party as interchange sender :

    EDI Properties -->Party as Interchange Sender --> X12 Interchange Processing -->
    Default Target Namespace.

    , though you can modify the Schemaname such as X12_00401_210_Custom.

    For Party as interchange receiver :

    Party As Interchange Receiver --> GS and ST segment definition --> Target NameSpace.

    Though in order to make a differenciation you could change the schema name such as X12_00401_201_Custom.

    Regards
    Vishnu


    Vishnu
    Tuesday, November 10, 2009 3:01 PM
  • HI, Could you please paste your X12 message. Regards Vishnu
    Vishnu
    Wednesday, November 11, 2009 9:17 AM
  • "210453862009071580000ASAFBZZGSSHEASYWAY-SHIPPING ONLY255383250412 S COOPERCINCINNATIOH45215USCNJULIE WORD2501684 RIDGE ROADSONOMACA95476US1200908051247MERY AYERS1RETAIL MERCHANDISE1232LB47PCS111368400FREIGHT CHARGE224556DELDELIVERY CHARGE333119405FUEL SURCHARGE442000685THRESHOLD DELIVERY5648N11487MR2104347"
    • Edited by Prakash CMS Wednesday, November 11, 2009 9:41 AM Resending
    Wednesday, November 11, 2009 9:37 AM
  • 210453862009071580000ASAFBZZGSSHEASYWAY-SHIPPING ONLY255383250412 S COOPERCINCINNATIOH45215USCNJULIE WORD2501684 RIDGE ROADSONOMACA95476US1200908051247MERY AYERS1RETAIL MERCHANDISE1232LB47PCS111368400FREIGHT CHARGE224556DELDELIVERY CHARGE333119405FUEL SURCHARGE442000685THRESHOLD DELIVERY5648N11487MR2104347"
    Wednesday, November 11, 2009 9:42 AM
  • Vishnu, The codes I tried to paste is not appearing as XML. is there any email id, will send you the information as an attachment. Thanks & Regards, Prakash
    Wednesday, November 11, 2009 9:44 AM
  • Please send the message to bt.evangelist@live.com

    Regards
    Vishnu
    Vishnu
    Wednesday, November 11, 2009 11:03 AM
  • Vishu, Hope you have got the mail. Regards, Prakash CMS
    Wednesday, November 11, 2009 12:55 PM
  • Hi Vishu,
    Any update for me.

    With Regards,
    Prakash CMS
    Thursday, November 12, 2009 5:40 AM
  • Hi Prakash,

    I have replied to your mail as well.
    Do not change the TargetNameSpace. As you need to specify the TragetNameSpace while configuring the EDIProperties for the
    party as well under BizTalk Admin Party section or else you need to change Default TargetNamespace there as well.Though in order to make a differenciation you could change the schema name such as X12_00401_201_Custom.

    I hope after this change it should work.

    Regards
    Vishnu


    Vishnu
    Thursday, November 12, 2009 12:48 PM
  • Dear Vishnu,
    I got that message, I had replied you another configuration, where we are getting the file name but the ISA and GS segment are repeating for all shipment status in the output file.

    Here, we have used the default schema and not the custom.

    below are the mail content sent to you:
    Vishnu,

    We had in fact tried without changing the default schema, below were the issues,

    1.       We are using batch process to consolidate multiple EDI to single EDI.

    2.       We configured the process to have a dynamic output file name.

    3.       The result: we are getting the desired output file name but the ISA and GS segment which supposed to appear only once in the header is getting repeated for every shipment status.

     

    Can you help me to resolve this?

    With Best Regards,
    Prakash CMS

    Thursday, November 12, 2009 12:58 PM
  • OK,

    In order to achieve this you need to use SQL stored procedure. Batching is usually used to club the messages before it goes to send port and by that you are getting Transaction set with ISA.
    I would suggest store the inbound information in the database, if it is already done then fine.
    create stored procedure to pick the desired number of messages from the DB in xml format and then map them according. Now before your message goes to pipeline assembler stage where header information is to be added you will have multiple transaction sets and then pipeline will add the envelope.

    To get the data in xml fromat from DB use FOR XML PATH.

    -- (SELECT A,B,C,D from tablename where 'condition' FOR XMLPATH('NodeName'), BINARY BASE64, TYPE)

    Please let me know if this fits as a solution to your problem and if not why?? we will take some different approach.

    Regards
    Vishnu
    Vishnu
    • Proposed as answer by Andrew_Zhu Friday, November 13, 2009 7:57 AM
    • Marked as answer by Andrew_Zhu Tuesday, November 17, 2009 3:28 AM
    Thursday, November 12, 2009 5:40 PM