Content-Type in uploaded filedocument

I have to sent the binary data of an excel-file as an attachment to a webservice. I uploaded the file as a filedocument in Mendix. The webservice call reports the following error: Attachment file is not valid; validation errors: Unknown attachment file type (content type: application/octet-stream) I asume that Mendix is setting the content type application/octect-stream at the upload of the fieldocument. Is there a way to adjust the contenttype in Mendix before calling the webservice. The correct contenttype for a xslx would be: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet Thanks in advance Marcel Kappert
2 answers

Hi Michiel,

Just putting it in an anwswer since it is not accepting my tagged message. I've looked at the topic you suggested, but my issue is that i cant override the xmime:content-type. My request (as the debug in webservices gives it, is like:

        <ns5:UploadDocumentRequest xmlns:xmime="">
            <ns5:AttachmentFile xmime:contentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet">binarycontent</ns5:AttachmentFile>

But it looks like it is still posted as content-stream: application/octet-stream

Pretty strange




Can you attach the WSDL of the webservice?
In an other question this seems to be caused by the wsdl:

(It's about using xmime:base64Binary instead of xs:base64Binary)