none
root element missing RRS feed

  • Question

  • I am developing application process order I have input EDI X12 850 file and I am mapping it to internal schema which I created , then map internal to CXML .

    But I am getting error root element missing. This error comes for internal message . I try to test map in visual studio with keeping all validation ON and it can genrate XML output. But when I am calling it in orchestration looks like it create empty message and get error "root element missing". 

       To do small test I create small test just send and receive port and configure map to verify and I can not see expected output I get xml output which is EDI equivalent created by EDI pipeline.

       I even add extra send port in orchestration to see output by map and I get nothing in output only get following error message

    There was a failure executing the send pipeline: "Microsoft.BizTalk.DefaultPipelines.XMLTransmit, Microsoft.BizTalk.DefaultPipelines, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Source: "XML assembler" Send Port: "SendPort2" URI: "C:\File_IN\customer\850\In\JustMap\out\maptestout\%MessageID%.xml" Reason: Root element is missing.

       If I try to use pass through pipeline I get empty file

       I spend lot time on this but could not understand exact issue. Can somebody help me to debug this issue ?

      I can provide required details .

     

    Thursday, August 25, 2016 6:35 PM

Answers

  • You got your problem !!..namespaces doesnt match....

    change the namespace of the message coming out of the pipeline and you are good to go!!!!

    Regards,


    Mandar Dharmadhikari

    • Marked as answer by dnyanbhar Thursday, August 25, 2016 10:24 PM
    Thursday, August 25, 2016 8:15 PM
    Moderator
  • Hi ,

    I would suggest going through the links below and set the settings in your party agreements

    https://msdn.microsoft.com/en-us/library/ff629788.aspx

    microsoft.com/en-in/library/bb246089.aspx

    refer a  sample screenshot below

    Try this and let us know

    Regards


    Mandar Dharmadhikari





    Thursday, August 25, 2016 8:29 PM
    Moderator
  • Disable the Fallback Settings and try again.

    Like changing the namespace, you should always disable the Fallback Settings.

    Just to remind, you really should chose a better namespace, drop the Microsoft reference altogether.

    • Marked as answer by dnyanbhar Thursday, August 25, 2016 10:25 PM
    Thursday, August 25, 2016 9:03 PM
    Moderator
  • Thanks for help.

    I think I resolved it. It was not working as ISA qualifier was different in parties vs file.

    I can see correct namespace in suspended message.

    • Marked as answer by dnyanbhar Thursday, August 25, 2016 10:43 PM
    Thursday, August 25, 2016 10:24 PM

All replies

  • Hi Dnyanbhar,

    To do small test I create small test just send and receive port and configure map to verify and I can not see expected output I get xml output which is EDI equivalent created by EDI pipeline.

     I believe that your map is not getting executed at the run time. 

    Please do the following:

    1) Remove the map on the receive port. Stop the send port to which you are sending the message and make the input message suspend

    2)  Check the context property of the message received by the pipeline

    3) Make sure that the message type of the EDI message matches the message type your map is expecting.

    It is just issue with the input message type not matching with the expected message type by the map . Also check if the xml generated after the edi pieline execution is a valid xml.

    If possible paste the screen shot of the message type of suspended message and also provide the message type expected by map at source which is nothing but the tragetNamespace#rootnode of the source schema

    Regards,


    Mandar Dharmadhikari


    Thursday, August 25, 2016 7:04 PM
    Moderator
  • Yes,

    I can see message type same as I am using. 

    Thursday, August 25, 2016 7:11 PM
  • 95%, one of the Maps is is wrong.  This could be due to an incorrect source type or a filter blocking any records from getting produced.

    You just have to follow it step by step until you find the place where no output is generated.

    Maybe there's a wrong message assignment somewhere?

    Thursday, August 25, 2016 7:13 PM
    Moderator
  • Hi ,

    Have you tested the map with the same output as generated by the EDI pipeline?? I would suggest post the schema generated by the pipeline and the xsd for the EDI message with us

    Regards,


    Mandar Dharmadhikari


    Thursday, August 25, 2016 7:13 PM
    Moderator
  • Thanks let me try things.

    One thing I am wondering I even can not see output when just use receive port and send port with map configured at send port. In this case I get output just created by receive port only, in short map never process it.

    I am also thinking map could be issue, so I tested in VS and it create output, so not sure how I can find map issue.

    Thursday, August 25, 2016 7:45 PM
  • yes..the main problem is map not getting executed...but befoe you debug the map..

    get the edi pipeline message by suspending the message and then try testing the map with that


    Mandar Dharmadhikari

    Thursday, August 25, 2016 7:50 PM
    Moderator
  • here is suspended message

    <ns0:X12_00401_850 xmlns:ns0="http://schemas.microsoft.com/BizTalk/EDI/X12/2006"><ns0:ST><ST01>850</ST01><ST02>100000001</ST02></ns0:ST><ns0:BEG><BEG01>00</BEG01><BEG02>SA</BEG02><BEG03>361600</BEG03><BEG05>20160708</BEG05></ns0:BEG><ns0:CUR><CUR01>BY</CUR01><CUR02>USD</CUR02></ns0:CUR><ns0:REF><REF01>ZZ</REF01><REF02>8006</REF02><REF03>SHERWIN WILLIAMS ORGANIZATION ID MUST RETURN ON 855</REF03></ns0:REF><ns0:REF><REF01>IA</REF01><REF02>335169</REF02></ns0:REF><ns0:REF><REF01>YB</REF01><REF02>0</REF02></ns0:REF><ns0:N9Loop1><ns0:N9><N901>L1</N901><N903>NOTES</N903></ns0:N9><ns0:MSG><MSG01>This is the comments field that needs to be on the invoice</MSG01></ns0:MSG></ns0:N9Loop1><ns0:N1Loop1><ns0:N1><N101>ST</N101><N102>PO CEP - Receiving</N102><N103>92</N103><N104>14655</N104></ns0:N1><ns0:N3><N301>11700 South Cottage Grove</N301></ns0:N3><ns0:N4><N401>Chicago</N401><N402>IL</N402><N403>60628</N403><N404>US</N404></ns0:N4><ns0:PER_2><PER01>SH</PER01><PER03>TE</PER03><PER04>773-821-3107</PER04><PER05>FX</PER05><PER06>773-821-3004</PER06></ns0:PER_2></ns0:N1Loop1><ns0:N1Loop1><ns0:N1><N101>BT</N101><N102>Sherwin-Williams Co (AP Use)</N102></ns0:N1><ns0:N3><N301>PO Box 94785</N301></ns0:N3><ns0:N4><N401>Cleveland</N401><N402>OH</N402><N403>44101</N403><N404>US</N404></ns0:N4></ns0:N1Loop1><ns0:N1Loop1><ns0:N1><N101>SU</N101><N102>ZONES INC</N102><N103>92</N103><N104>335169</N104></ns0:N1><ns0:N3><N301>PO BOX 34740</N301></ns0:N3><ns0:N4><N401>SEATTLE</N401><N402>WA</N402><N403>98124-1740</N403><N404>US</N404></ns0:N4></ns0:N1Loop1><ns0:N1Loop1><ns0:N1><N101>BY</N101><N102>Christopher Smith</N102></ns0:N1><ns0:PER_2><PER01>BD</PER01><PER03>TE</PER03><PER04>216-566-7452</PER04><PER07>EM</PER07><PER08>christopher.j.smith@sherwin.com</PER08></ns0:PER_2></ns0:N1Loop1><ns0:PO1Loop1><ns0:PO1><PO101>1</PO101><PO102>100</PO102><PO103>EA</PO103><PO104>10</PO104><PO106>VN</PO106><PO107>12345</PO107></ns0:PO1><ns0:PIDLoop1><ns0:PID_2><PID01>F</PID01><PID05>Zones EDI Test</PID05></ns0:PID_2></ns0:PIDLoop1><ns0:DTM_7><DTM01>002</DTM01><DTM02>20160710</DTM02></ns0:DTM_7></ns0:PO1Loop1><ns0:CTTLoop1><ns0:CTT><CTT01>1</CTT01></ns0:CTT></ns0:CTTLoop1><ns0:SE><SE01>25</SE01><SE02>100000001</SE02></ns0:SE></ns0:X12_00401_850>

    XSD I can not copy here due to size but it is standard 850 schema only I change namespace as below(highlighed)

    <?xml version="1.0"?>
    <xs:schema xmlns:btsedi="http://schemas.microsoft.com/BizTalk/2005/EdiSchemaEditorExtension" xmlns:b="http://schemas.microsoft.com/BizTalk/2003" xmlns="http://schemas.zones.com/BizTalk/EDI850/X12"targetNamespace="http://schemas.zones.com/BizTalk/EDI850/X12" version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema">
      <xs:annotation>
        <xs:appinfo>
          <schemaEditorExtension:schemaInfo namespaceAlias="btsedi" extensionClass="Microsoft.BizTalk.Edi.SchemaEditorExtension.EdiSchemaExtension" standardName="EDI" xmlns:schemaEditorExtension="http://schemas.microsoft.com/BizTalk/2003/SchemaEditorExtensions" />
          <b:schemaInfo version="1.0" document_type="850" standard="EDI" standards_version="00401" root_reference="X12_00401_850" displayroot_reference="X12_00401_850" xmlns:b="http://schemas.microsoft.com/BizTalk/2003" X12ConditionDesignator_Check="No" />
        </xs:appinfo>
      </xs:annotation>
      <xs:annotation>
        <xs:documentation xml:lang="en">copyright © Microsoft Corporation. All rights reserved.</xs:documentation>
      </xs:annotation>
      <xs:annotation>
        <xs:documentation>Schema name: X12_4010_850</xs:documentation>
      </xs:annotation>
      <xs:element name="X12_00401_850">
        <xs:annotation>
          <xs:appinfo>
            <b:recordInfo structure="delimited" field_order="postfix" delimiter_type="inherit_record" count_ignore="yes" xmlns:b="http://schemas.microsoft.com/BizTalk/2003" notes="Purchase Order" />
          </xs:appinfo>

    Namespace in pipeline message is default one is that be problem. I mean XSD namespace is modified but suspended message is with default namespace.



    Thursday, August 25, 2016 8:10 PM
  • You got your problem !!..namespaces doesnt match....

    change the namespace of the message coming out of the pipeline and you are good to go!!!!

    Regards,


    Mandar Dharmadhikari

    • Marked as answer by dnyanbhar Thursday, August 25, 2016 10:24 PM
    Thursday, August 25, 2016 8:15 PM
    Moderator
  • That what my problem is , I can not use default namespace as I have already schema with same namespace lying. So I need to deploy with different namespace. But looks like message coming in could not reflect that namespace.

       Now my question is how I can achieve it?

     
    Thursday, August 25, 2016 8:23 PM
  • Hi ,

    I would suggest going through the links below and set the settings in your party agreements

    https://msdn.microsoft.com/en-us/library/ff629788.aspx

    microsoft.com/en-in/library/bb246089.aspx

    refer a  sample screenshot below

    Try this and let us know

    Regards


    Mandar Dharmadhikari





    Thursday, August 25, 2016 8:29 PM
    Moderator
  • I tried this change but still getting default namespace. It is really strange as I use this before such customization and worked well. Not sure why this change is not getting set yet . 
    Thursday, August 25, 2016 9:00 PM
  • Disable the Fallback Settings and try again.

    Like changing the namespace, you should always disable the Fallback Settings.

    Just to remind, you really should chose a better namespace, drop the Microsoft reference altogether.

    • Marked as answer by dnyanbhar Thursday, August 25, 2016 10:25 PM
    Thursday, August 25, 2016 9:03 PM
    Moderator
  • I changed both Local host setting and envelop but somehow not get effective . I even restart host instances, close and restart admin console but no luck yet
    Thursday, August 25, 2016 9:05 PM
  • Hi

    As johns 305 suggested, disable the fall back settings because.. As with all fallback agreement properties, these properties apply only when BizTalk Server has not determined the agreement to which an incoming our outgoing message resolves to. (quoting MSDN)


    Mandar Dharmadhikari

    Thursday, August 25, 2016 9:09 PM
    Moderator
  • I disable fallback setting and got the error saying fallback setting disable. So I enable again and test but no change.

    As suggested I will change namespace very different and see

    Thursday, August 25, 2016 9:20 PM
  • Can fallback settings can apply one one trading partner , can you please tell me how I can do. I try to disable by right click on parties and it gives error 

    A message received by adapter "FILE" on receive location "RecLocCustomer850" with URI "C:\File_IN\customer\850\In\*.txt" is suspended. 
     Error details: An output message of the component "Unknown " in receive pipeline "Microsoft.BizTalk.Edi.DefaultPipelines.EdiReceive, Microsoft.BizTalk.Edi.EdiPipelines, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" is suspended due to the following error: 
         Error: 1 (Miscellaneous error)
    519: Fallback Settings for the x12 Protocol is in Disabled state..
     The sequence number of the suspended message is 1.  
     MessageId:  {AB6AC5A9-6DEE-473E-802F-08F956F0E415}
     InstanceID: {D8A2FAE8-4C8C-4985-8AD0-5D7CDE744394}

    Thursday, August 25, 2016 9:30 PM
  • No, leave the Fallback Settings Disabled.  

    You have to ready the full error, it will tell you exactly what is wrong.  Your current problem is the Fallback Settings.

    Once you get the Agreement resolving correctly, then you need to get the schema resolving correctly.  Then you will have the correct Xml representation.

    Thursday, August 25, 2016 9:32 PM
    Moderator
  • I changed my namespace totally different, configured to use my namespace in parties.Disabled fallback settings but still same problem. I still see default namespace.

    Thursday, August 25, 2016 9:41 PM
  • sorry I see error saying Fallback setting for X12 protocol is disabled.
    Thursday, August 25, 2016 9:43 PM
  • I get message suspend with error 

    An output message of the component "Unknown " in receive pipeline "Microsoft.BizTalk.Edi.DefaultPipelines.EdiReceive, Microsoft.BizTalk.Edi.EdiPipelines, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" is suspended due to the following error: 
         Error: 1 (Miscellaneous error)
    519: Fallback Settings for the x12 Protocol is in Disabled state..
     The sequence number of the suspended message is 1. 

    suspended message is Raw EDI

    Thursday, August 25, 2016 9:57 PM
  • Yes, but that's happening because your Agreement is not resolving.

    You have to fix this step-by-step.  Now, you have figure out why the Agreement is not resolving, or why it's not resolving to the target schema, the one with your custom namespace.

    Leave the Fallback Settings Disabled.


    Thursday, August 25, 2016 10:03 PM
    Moderator
  • Thanks for help.

    I think I resolved it. It was not working as ISA qualifier was different in parties vs file.

    I can see correct namespace in suspended message.

    • Marked as answer by dnyanbhar Thursday, August 25, 2016 10:43 PM
    Thursday, August 25, 2016 10:24 PM