IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

documentToJSONString vs com.wm.util.Table

  • 1.  documentToJSONString vs com.wm.util.Table

    Posted Mon March 02, 2020 02:35 PM

    Hello Everyone.

    I developed a simple flow service that receives a XML String recovered from another IS Flow Service pipeline file.

    This service does the following:
    1 - Convert the XML String to IData “pipeData” document
    2 - Convert “pipeData” document content to a JSON String

    Everything runs fine, unless if the pipeline contains a javaclass=“com.wm.util.Table” record, as follows:

    <record name="T_LOG" javaclass="com.wm.util.Table">
    <array name="cols" type="value" depth="1">
    <value>MESSAGE</value>
    <value>ZZTURNSTILE</value>
    <value>ZZTIME</value>
    <value>ZZEVENT</value>
    <value>PERNR</value>
    <value>BEGDA</value>
    <value>ZEXCEPTION</value>
    <value>TYPE</value>
    </array>
    <list name="rows">
    <array type="value" depth="1">
    <value>Already saved in PA9011</value>
    <value>0033</value>
    <value>13:37:20</value>
    <value>C0</value>
    <value>37104843</value>
    <value>2020-03-01</value>
    <value>1</value>
    <value>E</value>
    </array>
    <array type="value" depth="1">
    <value>Already saved in PA9011</value>
    <value>0029</value>
    <value>13:38:48</value>
    <value>C0</value>
    <value>37100355</value>
    <value>2020-03-01</value>
    <value>1</value>
    <value>E</value>
    </array>
    </list>
    </records

    When the XML Pipeline String contains the content above the ‘documentToJSONString’ doesn’t works as expected. He outputs the following content instead of a JSON Array:

    "T_LOG" : "com.wm.util.Table [SAP_TABLE_NAME] (MESSAGE, ZZTURNSTILE, ZZTIME, ZZEVENT, PERNR, BEGDA, ZEXCEPTION, TYPE) 2536 rows"

    Please, how can I manage to show an array in the “T_LOG” JSON property instead of the content above?

    Thank you

    Screenshot_1.png
    Screenshot_2.png


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB


  • 2.  RE: documentToJSONString vs com.wm.util.Table

    Posted Thu March 05, 2020 11:47 PM

    Try if there is a way to post the xml string as-is without saving it as pipeline.


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB