How can I store the attachment of a Soap message

Hi, I am using a web service to retrieve a document from content management system. In SoapUi I see that a response message is sent back and attached to this message is the retrieved document. In Mendix am I also able to get the response, but I do not see the attachment. I guess that the document is attached, but I need to store it. How can that be done? Kind regards, Peter
2 answers

Normally a document is included in base64 encoding. If you mapping points to a filedocument specialization Mendix does the hard work for you and creates a filedocument. Be sure to assign a name with a correct extension like '.pdf'.

It is possible that your webservice calls results in a link to ftp, webservice or a different way to get the document. It that case you must create some logic to get that document.


Hi Chris,

The message content in response I got is:

<e:Envelope xmlns:d="" xmlns:i="" xmlns:fn35="" xmlns:fn40m="" xmlns:fn40="" xmlns:xop="" xmlns:e=""> <e:Body> <GetContentResponse xmlns=""> <ContentResponse i:type="fn40:ContentElementResponse" retrievalName="WVL12352USEN.PDF" totalSize="717387"> <SourceSpecification i:type="fn40:ObjectReference" classId="Document" objectId="{C404669C-524D-419C-B3A5-ED4B4F91E079}" objectStore="{A5E3D405-E66C-4B26-9093-650CBAC577ED}"/> <ElementSpecification elementSequenceNumber="0"/> <Content i:type="fn40:InlineContent"> <Binary> <xop:Include href=""/> </Binary> </Content> </ContentResponse> </GetContentResponse> </e:Body> </e:Envelope>

And an attachment.

Ik can see the name of the document and see a Href., but is this a ftp link?