soapuimtom

SOAP request with mtom attachment: No attachment for id <id> found in [attachment]


I try to connect to a SOAP web service using SoapUI (5.3.0). Additionally an mtom attachment should be send along. But it seems that there is some problem sending the attachment - I always get the following error message as a response:

No attachment for id someID found in [NameOfTheAttachmentFile.txt]

Here is what I did:

  1. Enabled the request property 'Enable MTOM'
  2. Added an attachment (in the Attchment section)
  3. Added some cid:12345
  4. Selected that cid within the "Part" column of the attachment

And here is part of the request:

<ws:stream mimeType="text/plain" uuid="0815" filename="Example.txt" ...>
     <ws:documentData>cid:1234</ws:documentData>
</ws:stream>

And as I can see in SoapUI's Raw view the document is send alongside the request... Any ideas whats causing the problem?


Solution

  • I found the problem. Even though I "connected" the cid with the attachment SoapUI is not using that cid in the mtmom Content-ID section. So originally cid:1234 was used (and selected in the 'Part' column of the attachments). But when looking at the request SoapUI is using the file name:

    Content-ID: <Example.txt>
    

    Now when changing either

    It would have been helpful (similar to Part) if the Content-ID would be selectable or be prefilled with the existing cid in SoapUI.