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 tinkywinky <aj...@gmail.com> on 2008/09/01 10:57:48 UTC

axis 1.2 dime and mime attachments.

Hello !

i 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.setUsername(login);
stub.setPassword(pwd);
stub._setProperty(AxisEngine.PROP_DOMULTIREFS, new Boolean("false"));
stub._setProperty(Call.ATTACHMENT_ENCAPSULATION_FORMAT,Call.ATTACHMENT_ENCAPSULATION_FORMAT_DIME);

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

Object[] attachments = stub.getAttachments();

MessageContext.getCurrentContext().getResponseMessage().getAttachmentsImpl().setSendType(Attachments.SEND_TYPE_MIME);

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

stub.clearAttachments();
} 
catch (AxisFault e){
throw e;
}
-- 
View this message in context: http://www.nabble.com/axis-1.2-dime-and-mime-attachments.-tp19250461p19250461.html
Sent from the Axis - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org