Need help with ‘tricky’ map output.

Home Page Forums BizTalk 2004 – BizTalk 2010 Need help with ‘tricky’ map output.

Viewing 1 reply thread
  • Author
    Posts
    • #20869

      Hi all…

      Haven’t posted in some time, figured I needed to throw a new curve out there to the gurus.  I’m not sure if anybody else is integrating to JDEdwards EnterpriseOne, and that isn’t necessarily a requirement, but the XML structure that is expected isn’t all that easy to work with.  Here’s a sample request feed:

      <jdeRequest pwd=”JDEINTEG” role=”*ALL” type=”callmethod” user=”JDEINTEG” environment=”XX811″ sessionidle=”3600″>
        <callMethod app=”XmlInterop” name=”POIntegration”>
          <params>
            <param name=”cTransactionType_EV01″>E</param>
            <param name=”jdTransDate_DATE01″>20080929</param>
            <param name=”szCommunity_HBMCUS”>123450000</param>
            <param name=”szLotNumber_HBLOT”>1234</param>
            <param name=”jdSalesDate_SDJ”>20080904</param>
            </param>
          </params>
        </callMethod>
      </jdeRequest>

      Now, here’s the source XML that I need to map over to the above XML:

      <RootInfo>
       <TransactionInfo>
        <Details Name=”TransActionType” Value=”E” />
        <Details Name=”TransDateTime” Value=”9/29/2008 8:46:11 AM” />
        <Details Name=”Community” Value=”123450000″ />
        <Details Name=”Lot” Value=”1234″ />
        <Details Name=”SalesDate” Value=”9/4/2008 8:12:47 PM” /> 
       </TransactionInfo>
      </RootInfo>

      I’m OK with actually mapping FROM the name/value pair using the necessary functoids, but, for the life of me I cannot get the desired map output. Any help would  be greatly appreciated.

      -Rich

    • #20881

      What is the output you are getting?

      • #20883

        [quote user="ruselw"]What is the output you are getting?[/quote]

        Thank you for the response…In one scenario, just testing one field, the loop is out of control but I get my attrib name and value populated:

        <jdeRequest pwd=”JDEINTEG” role=”*ALL” type=”callmethod” user=”JDEINTEG” environment=”XX811″ sessionidle=”3600″>
         <callMethod app=”XmlInterop” name=”POIntegration”>
          <params>
           <param name=”” />
           <param name=”” />
           <param name=”” />
           <param name=”” />
           <param name=”” />
           <param name=”” />
           <param name=”” />
           <param name=”szCommunity_HBMCUS”>3503900000</param>
           <param name=”” />
           <param name=”” />

        Out of curiousity, I add in another field from the source, and I receive this:

        <jdeRequest pwd=”JDEINTEG” role=”*ALL” type=”callmethod” user=”JDEINTEG” environment=”XX811″ sessionidle=”3600″>
         <callMethod app=”XmlInterop” name=”POIntegration”>
          <params>
           <param name=”” />
           <param name=”” />
           <param name=”” />
           <param name=”” />
           <param name=”” />
           <param name=”” />
           <param name=”” />
           <param name=””>3503900000</param>
           <param name=”” />
           <param name=”” />
           <param name=”” />
         …
           <param name=”” />
           <param name=”” />
           <param name=”szLotNumber_HBLOT”>3050</param>
           <param name=”” />
         …

        So in one path, I get my “szCommunity_HBMCUS” name and value.
        Another path, I miss the name, hit the value, and my second field “szLotNumber_HBLOT” name and values are correct.

        Both scenarios however, give me all of these blank nodes, I am using the Looping, Equal, Value Mapping and String functoids.

        I’m sure I’m missing the obvious..

        Thanks again!

        • #20888

          Strange.  The best way to debug that would be to debug the XSLT.  Here’s how: 

          1. Right click the map in solution explorer and click validate map.

          2. That will generate the output XSLT to a file and it will display a link to the file in the output window.

          3.  Open the file in the XML editor (Copy & paste the file path from the ouput window into “Open -> File”).

          4.  When the file opens, you should see a new “XML” menu option on the top toolbar.

          5.  You should see some for-each loops in the XSLT that control the looping.  My guess is that these are a bit off.

          6.  Add a breakpoint at the top of the XSLT.

          6.  Click XML -> Debug XSLT.  It will ask you to select an input file, and after that you can step through just like you were in C#.

          By the way, you might try removing the looping functoid.  Without the looping functoid, the mapper will take a guess at how the looping should work.  I have found that in many cases it is right.

          • #20896

            Thanks for tip on debugging this, I ended up taking this and built the custom xslt to do what I needed…this is my first stab at it so it may not be the prettiest thing out there, but it now does exactly what I needed!

Viewing 1 reply thread
  • The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.