B2B Integration

 View Only
  • 1.  XML JSON Transformer Service - B2Bi 6.0.3

    Posted Tue December 22, 2020 01:20 AM

    Hello All,

    Advance Merry Christmas and new year wishes.

    We are facing an issue when using XML Json Service to convert an xml document to corresponding json format.

    The sequence of xml tags/particle is randomly re-arranged in the json output and there is no option/params that we can provide to control / retain the same xml sequence in the output json format which will be an issue on downstream application.

    Can anyone shed some light how to retain the same xml sequence in the json output ?



    ------------------------------
    Pranjit Biswas
    ------------------------------


    #SupplyChain
    #B2BIntegration


  • 2.  RE: XML JSON Transformer Service - B2Bi 6.0.3

    Posted Wed December 23, 2020 07:47 AM

    Hi Pranjit,

    You are correct, as of now there is no option/params to control, Howerver I have not faced this issue yet, so I suggest you to try with a different/latest jar  (json-20170516.jar)file once or raise a PMR with IBM support.



    ------------------------------
    Shreekant Prasad
    ------------------------------



  • 3.  RE: XML JSON Transformer Service - B2Bi 6.0.3

    Posted Fri December 25, 2020 03:49 AM

    Thanks Sreekanth for the idea. Will check and see the version of json jar that is being currently used.

    I also got to know from Sreedhar (IBM) that in our current version, the elements are not retained in xml to json conversion. Its a documented issue.



    ------------------------------
    Pranjit Biswas
    ------------------------------



  • 4.  RE: XML JSON Transformer Service - B2Bi 6.0.3

    Posted Tue December 29, 2020 11:19 AM

    JSON itself is not ordered, so i do not think there will ever be an option on this.



    ------------------------------
    Guido Bahlmann
    Principal Support Engineer - Team Lead EMEA L2
    Precisely
    ------------------------------



  • 5.  RE: XML JSON Transformer Service - B2Bi 6.0.3

    Posted Wed December 30, 2020 03:43 AM

    If the order is indeterminate anywhere you need to rely on something that is.

    I doubt very much if you process the same input multiple times you would get a different result, so the tool is not at fault since as designed the order in the input determines the output. To fix this therefore use a tool that is determinate for example XSLT. This will take an unsorted input and add a determinate structure to the output and control/correct it ready for the next step e.g the mapper which requires order. 


    Hope that makes sense. 

    C



    ------------------------------
    Chris Thorpe
    ------------------------------



  • 6.  RE: XML JSON Transformer Service - B2Bi 6.0.3

    Posted Thu February 25, 2021 12:39 PM
    Hello, 

    Actually the XMLtoJSON parse api does not maintain the order of the elements. I solve the problem using an XSLT to mount the JSON.



    ------------------------------
    Fabio Aurelio Maciel Lima e Silva
    ------------------------------