You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Da...@azetaedp.it on 2008/10/01 11:53:43 UTC
Server side attachments and client side null values
Hi, I have a web service that accept request from a client, receiving a
complex java object e returning another complex java object. The web
service, also attach a huge xml file to the response message.
The problem is that if I don't attach any file, the client receive the
correct java object, if I attach the file, the client receive the file
correctly but the result of call.invoke is null.
This is the way I attach the file server side:
MessageContext msgContext= MessageContext.getCurrentContext();
Message response = msgContext.getResponseMessage();
DataHandler buildFile = new DataHandler(new
FileDataSource(toSend));
AttachmentPart aPart = new AttachmentPart(buildFile);
response.addAttachmentPart(aPart);
response.saveChanges();
Can anyone help me?