Set Content-Type of MTOM Attachment

1
I am trying to send some files over a web service. I'm consuming this external web service from my Mendix application. The external web service expects the files to be send as an MTOM attachment which works. I get an error from the external web service that the content type is not supported. Even though you cannot see the actual MTOM request with the logging in trace mode, I could make up out of the error message that Mendix sets a content-type of application/octet-stream to the MTOM attachment. Unfortunately the external web service will only accept application/pdf content-type. The file i'm trying to send is a PDF. When I use SOAPui it works fine, SOAPui recognizes the PDF and automatically sets the application/pdf content type. When I manually override this to application/octet-stream I get the same error as I get in Mendix. Is it possible to change the MTOM content-type? I hope so because otherwise I'll have to start with building this call in a custom Java action....  
asked
2 answers
0

After some research I found that the wsdl defines what the expected content-type of the MTOM attachment is:

<xs:element minOccurs="0" name="inhoud" type="xs:base64Binary" xmime:expectedContentTypes="application/pdf"/>

I've filed a support ticket 48699

answered
0

xs:base64Binary doesn't have a contentType attribute.

What happens when you change it to

<xs:element minOccurs="0" name="inhoud" type="xmime:base64Binary" xmime:expectedContentTypes="application/pdf"/>
answered