Multipart message attachment failed in HTTPGateway

Hi,

I encountered problem by sending multipart attachments to a
servlet via Mediator HTTPGateway. The problem happened on
v731 only. The servlet was successfully invoked, however, all
attached objects in the message payload seemed not reaching the
servlet. This demo worked fine in v721.

I did tracing carefully but couldn’t identify the problem. Could
somebody who installed v731 help me to identify the problem
(or the bug).

-------------------------------------------------------------------

The sequence looks like below:

<?xml version="1.0" encoding="UTF-8"?>



<step component=“SagEnumerator”
xbd.enumerator.direction=“MESSAGE_INFO”
xbd.target.contentID=“mt”
xbd.target.contentType=“text/xml”/>



<step component=“SagHttpGateway” xbd.http.method=“POST”
xbd.http.target.url=“http://localhost:8088/test/uploadservlet
xbd.target.contentID=“httpd” xbd.target.contentType=“text/xml”/>




-------------------------------------------------------------------
I have attached this simple multi-part messages demo. You simply
unzip all files and read the README.TXT for setup.

Thanks in advance,

Tony
test.zip (520 KB)

Hi Tony,

I have run this under 7.3.1 and the data appears to be getting to your servlet fine, but the Apache FileUpload classes are not liking something in the multipart format, but not enough to throw any exceptions.

I would suggest that you compare the http datastream being sent by the 7.2.1 and 7.3.1 Mediator and look for any differences in the various HTTP and MIME headers. You can use the TCPMON tool from Axis as a good way to intercept and save the http data.

Best regards,
Mike

Hi Mike,

We performed a test today by capturing the message stream sent
out from Mediator (721 & 731) and a small program using IE6
before reaching the fileupload servlet.

From the message stream, I identified a little bit different
between 721 & 731. But I have no idea why the fileupload servlet
can accept output from v721 & IE6.

Please assist.

Note: I have attached all message streams (.dat) in a zip file.
You could simply open them using notepad. Some data is not
readable (due to binary format). But we can still read the http
header.

…Tony
messages.zip (2.43 KB)

Hi Tony,

It turns out that you are experiencing a problem in the jakarta commons fileupload library in your servlet. There is a known bug (Bugzilla number 21269) that prevents the library from handling quotes around the boundary specification, even though the RFCs allow them (actually the RFCs recommend them.)

Anyway, if you search the jakarta commons mailing list (developer, not user) for “boundary” you will find a couple of proposed code fixes that could be applied to the fileupload source to correct this problem.

Best regards,
Mike