Forum Discussion

electro_n1k's avatar
15 years ago

Can't send attachments using soapUI 3.6 Pro

Using soapUI 3.5.1, an image attached to the request I'm sending in to my system was encoded into a long string, visible in the RAW output of the request, as such:

POST http://qa01:8080/smartagent/ExternalSource HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: text/xml;charset=UTF-8
SOAPAction: ""
User-Agent: Jakarta Commons-HttpClient/3.1
Host: qa01:8080
Content-Length: 1034

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsdl="http://www.thisisnumero.com/xml/smartagent/4.0/wsdl" xmlns:smf="http://www.thisisnumero.com/xml/smartagent/4.0/smf">
<soapenv:Header/>
<soapenv:Body>
<wsdl:injectEmailWorkItem>
<wsdl:WorkItem>
<smf:id>Sunglasses70022</smf:id>
<smf:to>Sunglasses@localhost.com</smf:to>
<smf:from>Sunglasses7002@localhost.com</smf:from>
<smf:subject>I've a Sunglasses 7002 problem</smf:subject>
<smf:body>I've a Sunglasses 7002 problem and would like your help please</smf:body>
<smf:attachment name="tiny.jpg" contentType="image/jpeg">
<smf:value>iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAIAAAD91JpzAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAATSURBVBhXY2BgYPj//z8YMzAAACnkBftXLqYoAAAAAElFTkSuQmCC</smf:value>
</smf:attachment>
</wsdl:WorkItem>
</wsdl:injectEmailWorkItem>
</soapenv:Body>
</soapenv:Envelope>


Using soapUI 3.5 this is showing as this:

POST http://qa01:8080/smartagent/ExternalSource HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: text/xml;charset=UTF-8
SOAPAction: ""
User-Agent: Jakarta Commons-HttpClient/3.1
Host: qa01:8080
Content-Length: 843

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsdl="http://www.thisisnumero.com/xml/smartagent/4.0/wsdl" xmlns:smf="http://www.thisisnumero.com/xml/smartagent/4.0/smf">
<soapenv:Header/>
<soapenv:Body>
<wsdl:injectEmailWorkItem>
<wsdl:WorkItem>
<smf:id>Navy70002</smf:id>
<smf:to>Navy@localhost.com</smf:to>
<smf:from>Navy7000@localhost.com</smf:from>
<smf:subject>I've a Navy 7000 problem</smf:subject>
<smf:body>I've a Navy 7000 problem and would like your help please</smf:body>
<smf:attachment name="tiny.jpg" contentType="image/jpeg">
<smf:value>cid:jpg</smf:value>
</smf:attachment>
</wsdl:WorkItem>
</wsdl:injectEmailWorkItem>
</soapenv:Body>
</soapenv:Envelope>


And doesn't send the attachment.
If in 3.6 I enter the string shown in the request for 3.5.1, the mock-email is successful and the image is shown. The request also contains a "part 2", which is not added to the standard 3.6 request.

Is this a bug introduced by the recent changes to attachment caching?

Apologies for the non-technical nature of this bug, I'm not a coder in any way, just using soapUI to emulate email production.

Thanks
Nik

4 Replies

  • I am having the same issue. Created functional tests in soapUI Pro 3.0.1 that sends a request with an attachment that is on the file system. Works fine in soapUI pro 3.0.1. Recently upgraded to 3.6 build dist-109-2010-09-13, build date 2010/09/13 13:46. Now these files either are not getting attached or are corrupted as they got to the server properly. For example, I upload a word doc and when I try to view it (following an attempted soap request to place on the server) Word is unable to open it.

    This is particularly a problem as I am hoping to use the soapUI to loadUI functionality and use loadUI to do performance tests.

    When running the request, my Raw request header for 3.6 is:

    Content-Length: 1103

    For 3.0.1 it is:

    Content-Length: 62530 (looks like there is no attachment included)

    Further, in the 3.6 request there is nothing beyond the header in the request - i.e. no soap envelope. In 3.0.1 I see the whole request.

    Did something change with 3.6? Is there something else that I need to do?
  • I'm facing similar problem. While sending attachment using 3.5 works well , but after installing latest 3.6.1, files are not getting attached to the request(binary data is not sent to server, instead its cid:xxx is being sent to the server).

    Kindly let me know the solution to the problem.
  • Hi!

    this has partially been fixed in the current nightly build, please give that a go to see if it works better.

    kind regards,

    /Ole
    eviware.com