This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Web Services and the fly likes axis 1.2 dime and mime soap attachments Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "axis 1.2 dime and mime soap attachments" Watch "axis 1.2 dime and mime soap attachments" New topic

axis 1.2 dime and mime soap attachments

winky tinky

Joined: Sep 01, 2008
Posts: 1
Hello !

i've got web service which receives an attachment from .NET service as DIME , adds this attachment to it's own response and sends back to client which accepts only MIME attachments.
When client receives attachment some data seems to be lost, if original file size were 356 000 bytes , client receives only 208 000 bytes.

would be glad to hear any solutions how to solve this! ^^,

Thanks in advance !

code looks something like that :

MyWebService service = new MyWebServiceLocator();

MyWebServiceSoap port = service.getenotarMyWebServiceSoap(new URL(serviceurl)); // .NET setvice url

org.apache.axis.client.Stub stub = (Stub) port;
stub.setTimeout(1000 * 60);
stub._setProperty(AxisEngine.PROP_DOMULTIREFS, new Boolean("false"));

DocumentInfo dinf = port.downloadDocument(dokument_id); // gets document from .NET service

Object[] attachments = stub.getAttachments();

MessageContext.getCurrentContext().getResponseMess age().getAttachmentsImpl().setSendType(Attachments .SEND_TYPE_MIME);

AttachmentPart ap = (AttachmentPart)attachments[0]; // always returns only 1 attachment .
MessageContext.getCurrentContext().getResponseMess age().addAttachmentPart(ap);

catch (AxisFault e){
throw e;
I agree. Here's the link:
subject: axis 1.2 dime and mime soap attachments
Similar Threads
Axis 1.1 and Attachments
Desperate newbie - problem with image attachment
SOAP with attachments in JBOSS
web service with attachment under java 1.6
Sending large attachments of more than 4.5 MB from java webservice to a .NET webser