Put following in the globalConfiguration section
of your server-config.wsdd file and make sure “C:\\Temp\\attachments”
exist in your file system.
<globalConfiguration>
<parameter
name="attachments.Directory"
value="C:\\Temp\\attachments"/>
</globalConfiguration>
When having attachment, if the size of
attachment is less than 13K, axis will keep it in the memory. If it is larger
than that, it look for the “attachments.Directory”
as a temporary storage.
Hope this helps.
Thanks
Tim Jian
Momentum systems, Inc.
From: ABOU LINA
[mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 27, 2006 12:24
PM
To: [email protected]
Subject: ava.io.IOException:The
device is not ready
Hi ,
i try to send a message with attachment.
(size < 13 Ko) success sent.
(size > 13 Ko). i got the message error :
------------------------------------------------------------------------------
Caused by: java.io.IOException:The device is not ready at
java.io.WinNTFileSystem.createFileExclusively(Native Method)
at java.io.File.checkAndCreate(File.java:1314)
at java.io.File.createTempFile(File.java :1402)
at
org.apache.axis.attachments.ManagedMemoryDataSource.flushToDisk(ManagedMemoryDataSource.java:386)
at
org.apache.axis.attachments.ManagedMemoryDataSource.write(ManagedMemoryDataSource.java:276)
at
org.apache.axis.attachments.ManagedMemoryDataSource.<init>(ManagedMemoryDataSource.java:149)
at org.apache.axis.attachments.MultiPartRelatedInputStream.readTillFound(MultiPartRelatedInputStream.java:557)
... 52 more
at
org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:260)
at
org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:169)
at
org.apache.axis.encoding.DeserializationContextImpl.endElement
(DeserializationContextImpl.java:1015)
at
org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch
(Unknown Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
at org.apache.xerces.parsers.DTDConfiguration.parse (Unknown
Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
Source)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
at
org.apache.axis.encoding.DeserializationContextImpl.parse(DeserializationContextImpl.java:242)
at
org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:538)
at org.apache.axis.Message.getSOAPEnvelope
(Message.java:376)
at org.apache.axis.client.Call.invokeEngine(Call.java:2583)
at org.apache.axis.client.Call.invoke(Call.java:2553)
at org.apache.axis.client.Call.invoke(Call.java:2248)
at org.apache.axis.client.Call.invoke (Call.java:2171)
at org.apache.axis.client.Call.invoke(Call.java:1691)
------------------------------------------------------------------------------------------------------
look please this part of my code :
-----------------------------------
DataHandler xlsDhSource = new DataHandler(new FileDataSource(xlsAbsolutePath));
QName
xlsDataHandlerAttachment = new
QName("urn:Receiver","XLSDataHandler");
call.registerTypeMapping(xlsDhSource.getClass(), xlsDataHandlerAttachment,
JAFDataHandlerSerializerFactory.class,
JAFDataHandlerDeserializerFactory.class);
DataHandler
xmlDhSource = new DataHandler(new FileDataSource(xmlAbsolutePath));
QName
xmlDataHandlerAttachment = new QName("urn:Receiver","XMLDataHandler");
call.registerTypeMapping(xmlDhSource.getClass(),
xmlDataHandlerAttachment,
JAFDataHandlerSerializerFactory.class,
JAFDataHandlerDeserializerFactory.class);
call.addParameter("id",
XMLType.SOAP_LONG, ParameterMode.IN);
call.addParameter("type", XMLType.SOAP_STRING,
ParameterMode.IN);
call.addParameter("contenu", XMLType.SOAP_STRING,
ParameterMode.IN);
call.addParameter("xlsTemplateName", XMLType.SOAP_STRING,
ParameterMode.IN);
call.addParameter("xmlTemplateName", XMLType.SOAP_STRING,
ParameterMode.IN);
call.addParameter("xlsSource", xlsDataHandlerAttachment,
ParameterMode.IN);
call.addParameter("xmlSource", xmlDataHandlerAttachment,
ParameterMode.IN);
call.setReturnType(XMLType.SOAP_BOOLEAN);
Boolean ret =
(Boolean) call.invoke(new Object[]{
message.getId(), message.getType(),
message.getContenu(), xlsTemplateName, xmlTemplateName, xlsDhSource,
xmlDhSource});
thx in adv.
NOTICE: This message (including any attachments) from Momentum Systems, Inc. contains information that is PRIVILEGED and CONFIDENTIAL. If you are not an intended recipient, you are hereby notified that any dissemination of this message is strictly prohibited. If you have received this message in error, please do not read, copy or forward this message. Please permanently delete all copies and any attachments and notify the sender immediately by reply email or by calling our Office at 703.740.9300.