webMethods

webMethods

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
  • 1.  webMethods : Trying to send a file using an pub.client:http post request

    Posted Mon June 03, 2024 04:04 AM

    Hello fellow developpers, I know several posts are supposed to cover this matter, I’ve read them all a few times, but none of them are recalling my problem.

    What I’m trying to do is just receiving a file (multipart/from-data) from an API I’m exposing, and directly send the file back to another API without doing anything to the file.

    The first part works well, I’m able to get the ‘contentStream’ variable containing the form-data, here is what I’m getting, copied in a file (the black square is just to censore some data) :
    image

    The issue comes when I want to send the data, it appears the receiving API doesn’t receive anything after the boundary in the http request. I’ve tried to create an API of my own to send it and check the result but same, can’t get anything out of it

    I’ve tried everything I could find here (and more) but I couldn’t make it work

    Does any one of you have an idea here?

    It’s on webMethods 10.15 by the way.

    Thanks!


    #Integration-Server-and-ESB
    #webMethods


  • 2.  RE: webMethods : Trying to send a file using an pub.client:http post request

    Posted Mon June 03, 2024 10:03 AM

    Try with these steps , You can try to use dummy target API from this site: https://webhook.site/

    image


    #webMethods
    #Integration-Server-and-ESB


  • 3.  RE: webMethods : Trying to send a file using an pub.client:http post request

    Posted Mon June 03, 2024 10:37 AM

    If the data is just passing through and the wM IS doesn’t need to do anything to the data, then perhaps this will work:

    • Pass the contentStream that is received in the call to the HTTP call made to the target.
    • You’ll need to copy HTTP headers too. Not all of them but the headers important for MIME handling. The Content-Type header contains the boundary marker needed to parse the multipart body. The MIME-Version header is important too.

    The steps @Sandeep_Deepala shared should work but the above may work for you as well.


    #Integration-Server-and-ESB
    #webMethods


  • 4.  RE: webMethods : Trying to send a file using an pub.client:http post request



  • 5.  RE: webMethods : Trying to send a file using an pub.client:http post request

    Posted Mon June 10, 2024 10:25 AM

    Yes, that thread reflects what @Sandeep_Deepala shared and is useful if the IS components need to parse or do something specific with the form content. But if the form or parts do not need to be manipulated and only passed on to another system, then the steps can be simplified, not needing the MIME services.


    #webMethods
    #Integration-Server-and-ESB


  • 6.  RE: webMethods : Trying to send a file using an pub.client:http post request

    Posted Wed June 12, 2024 04:12 AM

    Thank you so much, I really though I already tried this one, but I must have done something wrong the first time, sorry for the time loss!


    #webMethods
    #Integration-Server-and-ESB