Forum Discussion

pmorton's avatar
pmorton
New Contributor
9 years ago

Multipart requests to a mock service under SSL appear to be truncated

I have some mock SOAP services in SoapUI for a service that's supposed to accept file uploads, and I was testing with both inline base64-encoded files and files as attachments (MTOM/XOP). The actual service is going to be protected by SSL, so I also have the mock services set up using SSL.

 

I appear to be encountering some kind of size limit truncating the message when using both SSL and multipart messages. I'm not sure where exactly the limit is (I'm not sure whether the http headers are counting against me), it seems like maybe somewhere around 4k.

 

My client test code is set up to submit a request with two images, and I can affect what problem I encounter by changing whether the client connects using SSL and whether I send the images inline or as attachments.

 

If I use SSL and send both images as attachments, SoapUI only shows one attachment and its size is smaller than the size of either file (e.g. message log, attachments tab, size column says 2259 when the file is 3526 bytes).

 

If I increase or decrease the size of an unrelated string within the soap body, I see SoapUI's reported size of the attachment adjust accordingly (e.g. remove a byte from the body, attachment now says 2260).

 

If I use SSL, inline one image, and send the other as an attachment, I get a fault response with the string "org.apache.xmlbeans.XmlException: error: XML document structures must start and end within the same entity.", which based on the other two observations I assume is because it truncated the request in the middle of the soap body (the soap body having gotten much larger due to the inline image inclusion).

 

If I use SSL and inline both images, the request succeeds, though the request size is larger than when the files are attachments (because the inlined file contents are base64-encoded). From this I guess that it has something to do with multipart.

 

If I connect without using SSL, with both images as attachments, it succeeds and SoapUI shows both attachments with the proper file sizes.

 

I'm using gSoap for my client code, and its log of what it sent all looks correct (I don't see any truncated requests, I see multipart requests and attachments where I was supposed to, etc...)

 

Is there something I'm missing that would cause this?

  • fenix's avatar
    fenix
    New Contributor

    Did you find any solution?

     

    I have the same problem. Our application sends request with MTOM attachment to SaopUI. Attachment in SoapUI is all right when SSL is not used. If SSL is enabled, received file has no more than 6882 B (even if the original file was bigger).

     

    I implemented my own mock service and there was no problem with bigger files. So, the problem should be connected with SoapUI (its configuration or something else) but I do not know what is wrong.

    • pmorton's avatar
      pmorton
      New Contributor
      No, I haven't found a way around it; the project I'm working on doesn't need the attachment-including operations yet, so I haven't focused too much attention on it (the attachment tests I was doing that led to the original post were to make sure that the client-side soap kit we were using was capable of handling them).