none
Root element is missing while executing outbound map of WCF-adapter send port.

    Question

  • Hello,

    I am getting following error while executing the outbound map of send port. 

    Error details: The Messaging Engine failed while executing the outbound map for the message going to the destination URL "https://PC-1:8443/mockBrontoSoapApiImplServiceSoapBinding" with the Message Type "http://BCI_DataSync.com/schemas/DataSync/internal/2013-06#Token". Details:"Root element is missing." 

    What could be the reason?

    Regards,

    Pabitra


    Hello

    Tuesday, July 30, 2013 12:37 PM

Answers

  • Pabitra,

    You mentioned following in one of your reply:

    The output of test map if following.
    - <ns0:login xmlns:ns0="http://api.bronto.com/v4">
      <apiToken>apiToken_0</apiToken>
    </ns0:login>
    
    Which is fine.
    
    The input is follows.
    - <ns0:Token xmlns:ns0="http://BCI_DataSync.com/schemas/DataSync/internal/2013-06">
      <apiToken>apiToken_0</apiToken>
    </ns0:Token>
    

    And you also mention in one of your reply that:

    Code of message assignement construct.
    
    xmlDoc = new System.Xml.XmlDocument();
    xmlDoc.LoadXml("<v4:login xmlns:v4='http://api.bronto.com/v4'><apiToken>112344</apiToken></v4:login>");
    BrontoApiToken = xmlDoc;

    And the screen shot of the map as follows:

    Now the problem I see is this, the input message for map that you are creating in message assignment is actually the out put message of the map, no wonder you are getting "Root element missing" because you are passing Map output message as an input to the map. In other words, your message assignment should be something like this:

    xmlDoc = new System.Xml.XmlDocument();
    xmlDoc.LoadXml("<ns0:Token xmlns:ns0='http://BCI_DataSync.com/schemas/DataSync/internal/2013-06'><apiToken>112344</apiToken></ns0:Token>");
    BrontoApiToken = xmlDoc;

    rather than this:

    xmlDoc = new System.Xml.XmlDocument();
    xmlDoc.LoadXml("<v4:login xmlns:v4='http://api.bronto.com/v4'><apiToken>112344</apiToken></v4:login>");
    BrontoApiToken = xmlDoc;


    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful.

    Friday, August 02, 2013 1:49 PM

All replies

  • Can you test your outbound map and see if it generates good response?


    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful.


    • Edited by SAAkhlaq Tuesday, July 30, 2013 1:00 PM edit
    Tuesday, July 30, 2013 1:00 PM
  • The reason for the error is the map result is nothing.  What you need to figure out is why the Map result is nothing.

    Stop, don't Unenlist, the Send Port.  Save the Suspended message and test in Visual Studio.

    Tuesday, July 30, 2013 1:12 PM
  • The output of test map if following.

    - <ns0:login xmlns:ns0="http://api.bronto.com/v4">
      <apiToken>apiToken_0</apiToken>
    </ns0:login>

    Which is fine.

    The input is follows.

    - <ns0:Token xmlns:ns0="http://BCI_DataSync.com/schemas/DataSync/internal/2013-06">
      <apiToken>apiToken_0</apiToken>
    </ns0:Token>


    Hello

    Tuesday, July 30, 2013 1:47 PM
  • Oops, that message is actually warning that the incoming message is wrong somehow.  Sorry, I need to read more carefully.

    Anyway, if you take the Map off the Port, does the original message appear?

    Tuesday, July 30, 2013 1:54 PM
  • >>> Anyway, if you take the Map off the Port, does the original message appear?

    Sorry I could not understand above statement. Does it mean,

    If I remove map from outbound map of send port and test, then original message appear or not?

    I can not remove map from send port.


    Hello

    Tuesday, July 30, 2013 2:11 PM
  • Hi Pabitra,

    The  error tells you that Outbound structure was not created, and the creation of the outbound structure is triggered by the incoming message with data. So can you check what message you get before you map on send port.


    I hope this helps!!!!!! Please mark as Helpful. If this answers your question, please mark it as &amp;quot;Answered&amp;quot;. It will help to reduce visits to same post as it&#39;s already answered and will help guys with same question as yours without even posting it . Maheshkumar S. Tiwari|Team lead/Consultant(EDI/EAI)|iVision Software Pvt Ltd, Pune.

    Tuesday, July 30, 2013 2:39 PM
  • The message is created fine with a assignment construct just before sending to send port which has Outbound map.

    Hello

    Tuesday, July 30, 2013 2:53 PM
  • Can you paste your code from Message Assignment Construct here ?


    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful.

    Tuesday, July 30, 2013 2:56 PM
  • Code of message assignement construct.

    xmlDoc = new System.Xml.XmlDocument();
    xmlDoc.LoadXml("<v4:login xmlns:v4='http://api.bronto.com/v4'><apiToken>112344</apiToken></v4:login>");
    BrontoApiToken = xmlDoc;


    Hello


    • Edited by Pabitra Dash Tuesday, July 30, 2013 3:01 PM dssdfsdf
    Tuesday, July 30, 2013 3:00 PM
  • Can you please share the screen shot of your orchestration (specifically the part where you are creating this xml and sending out to send port) and the screen shot of your outbound map (that you have used on send port)

    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful.

    Tuesday, July 30, 2013 3:05 PM
  • Sure you can.  Though you may have to use a File adapter with a PassThrough.  What you need to check is the data that's hitting the Port.

    Tuesday, July 30, 2013 3:09 PM
  • It is hitting that's why the following error occurs.

    The Messaging Engine failed while executing the outbound map for the message going to the destination URL "https://PC-1:8443/mockBrontoSoapApiImplServiceSoapBinding"

    https://PC-1:8443/mockBrontoSoapApiImplServiceSoapBinding, is URI of WCF basic http adapter which is attached to 'static solicit response' port.


    Hello

    Tuesday, July 30, 2013 3:41 PM
  • The output of validate map is as follows.

    <ExtensionObjects />

    Is this a problem?


    Hello

    Friday, August 02, 2013 9:55 AM
  • <ExtensionObjects /> is a default value that is not a problem.

    Try redeployng the schemas/Masps project.

    Check in Orch send shape associated with the proper message which you want to send to send port.

    If you have direct bound send port try create one way static send port with out mapping applied and verify how message is coming out from the orchestration.

    Or It may be xmldocument msg(which is created in orch) is not compatible with the schema you deployed.

    Can you share map and orchestration structure.


    Srikanth Peddy. MCTS-BizTalk Server Please mark as answered . http://sharebiztalk.wordpress.com/

    Friday, August 02, 2013 10:17 AM
  • I redeployed schemas/Maps projects. But no luck. This is not direct bound send ports.

    xmldocument msg(which is created in orch) is compatible with the schema I deployed.

    Attaching Map and orchestration structure.


    Hello


    Friday, August 02, 2013 10:35 AM
  • Stop (not unenlist)the send port and test once.Capture the message from send port in Admin console .save as a xml file. Now test the map (which you configured in send port) in VStudio  with the saved xml as a source file.

    Srikanth Peddy. MCTS-BizTalk Server Please mark as answered . http://sharebiztalk.wordpress.com/


    Friday, August 02, 2013 11:15 AM
  • Pabitra,

    You mentioned following in one of your reply:

    The output of test map if following.
    - <ns0:login xmlns:ns0="http://api.bronto.com/v4">
      <apiToken>apiToken_0</apiToken>
    </ns0:login>
    
    Which is fine.
    
    The input is follows.
    - <ns0:Token xmlns:ns0="http://BCI_DataSync.com/schemas/DataSync/internal/2013-06">
      <apiToken>apiToken_0</apiToken>
    </ns0:Token>
    

    And you also mention in one of your reply that:

    Code of message assignement construct.
    
    xmlDoc = new System.Xml.XmlDocument();
    xmlDoc.LoadXml("<v4:login xmlns:v4='http://api.bronto.com/v4'><apiToken>112344</apiToken></v4:login>");
    BrontoApiToken = xmlDoc;

    And the screen shot of the map as follows:

    Now the problem I see is this, the input message for map that you are creating in message assignment is actually the out put message of the map, no wonder you are getting "Root element missing" because you are passing Map output message as an input to the map. In other words, your message assignment should be something like this:

    xmlDoc = new System.Xml.XmlDocument();
    xmlDoc.LoadXml("<ns0:Token xmlns:ns0='http://BCI_DataSync.com/schemas/DataSync/internal/2013-06'><apiToken>112344</apiToken></ns0:Token>");
    BrontoApiToken = xmlDoc;

    rather than this:

    xmlDoc = new System.Xml.XmlDocument();
    xmlDoc.LoadXml("<v4:login xmlns:v4='http://api.bronto.com/v4'><apiToken>112344</apiToken></v4:login>");
    BrontoApiToken = xmlDoc;


    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful.

    Friday, August 02, 2013 1:49 PM
  • Thank you. I would try out your suggestion tomorrow and vote accordingly. Thanks a ton again.

    Hello

    Friday, August 02, 2013 5:11 PM