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.



#Automation


#Applicationintegration
#webMethods
#Integration
 View Only
Expand all | Collapse all

XML to XLS

  • 1.  XML to XLS

    Posted 08/23/19 04:19 AM

    Hi Experts,

    would know a service on webMethods that can convert an XML input to XLS file.
    an example of service please.

    Thank you in advance.
    Regards,


    #Integration-Server-and-ESB
    #webMethods


  • 2.  RE: XML to XLS

    Posted 08/23/19 02:18 PM

    Hi,

    there is no such service ootb.

    you can create on of your own by writing java service wrapper for an public office API like Apache POI.

    Also check the community as there are currently other threads ongoing discussing the same thing.
    When creating a CSV file is sufficient you can check for the Flat-File feature.

    Regards,
    Holger


    #webMethods
    #Integration-Server-and-ESB


  • 3.  RE: XML to XLS

    Posted 08/26/19 08:47 AM

    In addition to the above details already provided, can you share the sample xml input and your expected XLS file, can try with some pointers on java service.


    #webMethods
    #Integration-Server-and-ESB


  • 4.  RE: XML to XLS

    Posted 08/26/19 10:11 AM

    Hello Mahesh K. Sreenivas

    for the sample file I want to have it as xls file:
    Sup Order_Number Line Created_Date_UTC Quantity Req_Ex_Works_Order
    ibf 0003660866 DLO GV 30 1045412

    I was able to do it with an XLST service but I wanted to have a java service too, but I’m not good at java.
    exemple.xml (354 Bytes)


    #webMethods
    #Integration-Server-and-ESB


  • 5.  RE: XML to XLS

    Posted 08/26/19 02:51 PM

    Hi,

    just one question:
    When there is a working solution by using XSLT (can be integrated into webMethods services by using the WmXSLT package), why bothering with creating complex Java services by using external API?

    Regards,
    Holger


    #webMethods
    #Integration-Server-and-ESB


  • 6.  RE: XML to XLS

    Posted 08/27/19 03:22 AM

    Don’t Reinvent The Wheel!

    On your request, you can refer the below java code for creating the XLS from IData, covert the xml to IS Document and use this service.

    http://techcommunity.softwareag.com/pwiki/-/wiki/Main/Java%20Service%20to%20convert%20StringList%20and%20DocList%20to%20XLS%20-%20ToExcel%20Utility

    Any questions?


    #Integration-Server-and-ESB
    #webMethods


  • 7.  RE: XML to XLS

    Posted 08/27/19 06:19 AM

    Hello Mahesh K. Sreenivas

    Thank you very much.

    But when i run the demo , i have this error:

    java.lang.reflect.InvocationTargetException:org/apache/poi/hssf/usermodel/HSSFWorkbook

    I has been tested on IS 9.7 with JDK 1.7

    Thank

    Regards


    #webMethods
    #Integration-Server-and-ESB


  • 8.  RE: XML to XLS

    Posted 08/27/19 07:10 AM

    Might be the POI jar compatibility issue with JDK (as per the details, but not sure unless I test it myself), can you download jar as per your JDK version and note that I do not have 9.7 IS installation setup currently to test, the code posted on the forum was tested on IS 10.4 with JDK 1.8.

    POI 4.0 and later require JDK version 1.8 or later.
    
    POI 3.11 and later 3.x versions require JDK version 1.6 or later.
    
    POI 3.5 to 3.10 required the JDK version 1.5 or later. Versions prior to 3.5 required JDK 1.4+.

    For more quesitons, feel free to write me an email.


    #webMethods
    #Integration-Server-and-ESB


  • 9.  RE: XML to XLS

    Posted 08/27/19 03:48 PM

    Hi,

    as wM 9.7 is running on Java 7 by default (not sure if it is already using Java 8), POI 3.11+ should be fine.

    Regards,
    Holger


    #webMethods
    #Integration-Server-and-ESB