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

Creating a zipfile and sending it over HTTP

  • 1.  Creating a zipfile and sending it over HTTP

    Posted Tue March 21, 2023 04:58 AM

    What product/components do you use and which version/fix level are you on?

    webMethods-io Integration
    We are on cloud, should be the latest version/fix

    Is your question related to the free trial, or to a production (customer) instance?

    Customer Instance

    What are you trying to achieve? Please describe it in detail.

    What we are trying to achieve is to create a .zip and send it over http, currently our workflow creates a file through the “Write File” node, and use the link generated to zip it through the “Zip Files” node. Where we start struggling is to somehow get this zip file, so we can use this as body in our HTTP call, preferably binary. We have tried to use the “Read File” node for this purpose, but the data come back seemingly corrupted.

    Is there maybe a way to reference the link created by the “Zip Files” to be used as the RequestBody?
    What would be the best practice to make this work?

    Extra question:
    How do we delete the created files after use?
    Is there a way to create a folder? We need to zip 2 files together into 1 zip file.

    Have you installed all the latest fixes for the products and systems you are using?

    We are on cloud, should be the latest version/fix


    #webMethods
    #webMethods-io-Integration


  • 2.  RE: Creating a zipfile and sending it over HTTP

    Posted Fri March 24, 2023 04:47 AM

    If you’re reading the file back in via read file, make sure to set the decoding option correctly, e.g. if I do this to set it to base64:

    I get the base64 value back.

    If I set it to buffer:
    image

    What you’re probably seen is a string representation of a zip file, which isn’t corrupted - it’s a binary file.

    e.g. - if I change it to ascii:
    image


    #webMethods-io-Integration
    #webMethods


  • 3.  RE: Creating a zipfile and sending it over HTTP

    Posted Fri March 24, 2023 05:13 AM

    On the deleting question - the workflow engine will be recycled after completion so the files should not exist on a subsequent run.

    You cannot create folders - the engine does not give full access to the file system.


    #webMethods-io-Integration
    #webMethods