Forum Discussion

paulavijit's avatar
paulavijit
New Contributor
11 years ago

Need assistance in sending MTOM attachments

Hi,

I have a web service through which clients can upload files as MTOM attachment. The web service works fine and has been tested successfully using a Java client.

When I try to test the same service using SoapUI 4.6.4, I get the following error:

<faultstring>No attachment for id 892557077319 found in [valid270.txt]</faultstring>

I have followed the instruction in an earlier post (viewtopic.php?t=4334) but it still does not work.

Any help will be greatly appreciated.

Regards
Paul

1 Reply

  • paulavijit's avatar
    paulavijit
    New Contributor
    Looks like I could resolve the issue. After enabling additional logging in my web service implementation I found the following:

    Value of the field which is used to upload file in HTTP request was: <inc:Include href="cid:892557077319" xmlns:inc="http://www.w3.org/2004/08/xop/include"/>

    In HTTP request the MTOM attachment's Content-ID was: <valid270.txt>

    The href above should match the Content-ID. As it was not matching the service was reporting the error, no attachment found.

    In the HTTP request from Java client these two matches.

    The issue is when in SoapUI Attachment tab after we browse and select a file, the ContentID defaults to the file name. If we update ContentID to the number we select from Part drop-down, then it works.

    Not sure if its a bug or a feature of SoapUI.

    Hope this finding helps others.