axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pradeep Reddy <deepgu...@gmail.com>
Subject Help! - WebSphere 5.1.1 issue with attachments
Date Wed, 08 Feb 2006 23:33:35 GMT
Hi all,

I am having trouble accessing the Response Message on WebSphere 5.1.1.
I am trying to send an attachment from server to the client. I add it to the
response message using this familiar code snippet.

MessageContext msgContext = MessageContext.getCurrentContext();
Message msg = msgContext.getResponseMessage();
msg.getAttachmentsImpl().setSendType(Attachments.SEND_TYPE_MIME);

AttachmentPart part = new AttachmentPart(new DataHandler(new
ArtifactDataSource(ais.getInfo().getName(),ais.getInputStream(),
ais.getContentType().toString())));//ArtifactDataSource is a custom
implementation of datasource
part.setContentId(ais.getInfo().getName());
msg.addAttachmentPart(part);
msg.saveChanges();

this code returns an attachment on weblogic 8.1. On WebSphere 5.1.1, i am
getting back a response with no xml message in it. I just get back these
headers with no xml message or the attachment.
HTTP/1.1 200 OK
Date: Wed, 08 Feb 2006 20:48:43 GMT
Server: IBM_HTTP_SERVER/1.3.28.1  Apache/1.3.28 (Unix)
Connection: close
Content-Type: multipart/related; type="text/xml";
start="<AA9A919955D1C926B85316860BEE7F3F>"; boundary=
1446154572.1139431723394.JavaMail.test.bluto

To debug, I retained only these calls:

MessageContext msgContext = MessageContext.getCurrentContext();
Message msg = msgContext.getResponseMessage();

This returned an empty soap message.
HTTP/1.1 200 OK
Date: Wed, 08 Feb 2006 22:00:48 GMT
Server: IBM_HTTP_SERVER/1.3.28.1  Apache/1.3.28 (Unix)
Connection: close
Content-Type: text/xml; charset=utf-8
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body/>
</soapenv:Envelope>

So when i call getResponseMessage(), its going through a seperate path and
giving me a brand new response. I am using axis 1.2 RC2.
Any help on what i can do to work around this problem would be greatly
appreciated.

Thanks,

Pradeep

Mime
View raw message