我的应用程序中的 SOAP 消息包含从文件创建的附件。当我打电话给soapMessage.writeTo(System.out); 不止一次,它会引发以下异常:
SEVERE: SAAJ0540: Error during saving a multipart message
com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: Error during saving a multipart message
at com.sun.xml.internal.messaging.saaj.soap.MessageImpl.writeTo(MessageImpl.java:1233)
at main.SOAPMTOMUtilityTest.main(SOAPMTOMUtilityTest.java:102)
Caused by: java.io.IOException: Read error
at java.io.FileInputStream.readBytes(Native Method)
这是一个错误吗?还是我做错了什么?