Content-Type in uploaded filedocument

0
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
asked
2 answers
0

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:

    <soapenv:Body>
        <ns5:UploadDocumentRequest xmlns:xmime="http://www.w3.org/2005/05/xmlmime">
            <ns5:XmlFile>binarycontent</ns5:XmlFile>
            <ns5:AttachmentFile xmime:contentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet">binarycontent</ns5:AttachmentFile>
        </ns5:UploadDocumentRequest>
    </soapenv:Body>

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

Pretty strange

BR,

Mike

answered
0

Can you attach the WSDL of the webservice?
In an other question this seems to be caused by the wsdl:
https://forum.mendix.com/link/questions/86029

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

answered