axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From King Minxiao <>
Subject attachment problems in using axis
Date Mon, 12 Dec 2005 03:09:24 GMT
I wrote a webservice to send files to client with axis attachment. Here is
my method doWithAttachment().
public void doWithAttachment() {
   Message repMsg =3D AxisEngine.getCurrentMessageContext
    AttachmentPart ap =3D repMsg.createAttachmentPart();
    ap.setDataHandler(new DataHandler(new
The content of file C:\\temp\\output\\test.txt is "This is a file used to
testing attachments in axis".
I received badly soap message when this method is invoked.Here is an
example for my received soap message.

Content-Type: text/xml; charset=UTF-8
Content-Transfer-Encoding: binary
Content-Id: <B2D785656F586DD1E238D3CD93B71D2F>

<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="" xmlns:xsd="" xmlns:xsi=""><soapenv:Body/></soapenv:Envelope
Content-Type: text/plain
Content-Transfer-Encoding: binary
Content-Id: <84AD45638D8A4A56555EAC788D829480>

I have to resolve to problems.
(1).Something is missed at the end of this soap message.They are
attachment-content and the attachment-caption.
(2).At the lable of soap message(just @@@lable at above),I want to add
something just like "Content-Length: 100",What should I do in my method?
Any suggestion is expected.


View raw message