I read this article and looked at what's been done regarding adding a PDF.
This allowed me to create a service that seems to work creating MIMEData, but I still get an error :
{"type":"about:blank","title":"Unsupported Media Type","status":415,"detail":"Content-Type 'text/csv' is not supported.","instance":"/files/v1/sftp/etl/fichier"}
the content type test/csv here is the one used in the service "pub.mime.addBodyPart" :
I have to set a content type, otherwise the addBodyPart service crashes, and no matter what type I set, I get the same error.
------------------------------
Geoffrey MOULIN
------------------------------
Original Message:
Sent: Mon October 20, 2025 11:46 AM
From: Dave Laycock
Subject: Send input as Multipart/formdata with webMethods
You likely need to use the pub.mime services for posting multipart/form-data.
There are some older forum posts covering using them with HTTP. E.g.
https://community.ibm.com/community/user/question/sending-an-xml-file-using-pubclienthttp
There is a guide for general usage of the services
https://www.ibm.com/docs/en/webmethods-integration/wm-integration-server/10.15.0?topic=mime-smime-developers-guide
------------------------------
Dave Laycock
Original Message:
Sent: Mon October 20, 2025 09:25 AM
From: Geoffrey MOULIN
Subject: Send input as Multipart/formdata with webMethods
Hello,
I'm currently working on replacing a curl script to make a call directly from the webmethods server integration.
the actual curl is :
-location 'https://monsite.fr/api/files/v1/sftp/etl/fichier' --form 'file=@'$fileName
I first retrieved my file in Bytes with the command "pub.file:getFile" then i use the "pub.client:http" service :
-url => "https://monsite.fr/api/files/v1/sftp/etl/fichier"
-method => "POST"
-loadAs => "bytes"
-data/bytes => object bytes (my file)
-headers/content-type => multipart/form-data
the result is : "{"timestamp":"2025-10-20","status":500,"error":"Internal Server Error","message":"Failed to parse multipart servlet request","path":"/files/v1/sftp/etl/fichier"}
it is same result if i let the value data/bytes empty, It's the same if i use stream, etc.
I'd like to know how to transmit my file so that it's properly processed.
I dont udnerstand how it works and how i am able to do the job.
Please Help me !
------------------------------
Geoffrey MOULIN
------------------------------