首页 新闻 会员 周边 捐助

Axis 请教高手帮忙解决.

0
悬赏园豆:100 [待解决问题]

File files[] = new File[3];
   files[0]=file;
   files[1]=file1;
   files[2]=file2;
   byte[] fbyte = null;
   byte[] fileEncrypt = null;
   DataSource fileDs = null;
   DataHandler fileDh = null;
   AttachmentPart fileAtt = null;
   List<AttachmentPart> attachments = new ArrayList<AttachmentPart>();
   int i=1;
   for(File f : files){
    if(f==null)continue;
    fbyte = ByteFileUtil.getBytesFromFile(f);
    fileEncrypt = AESJava.Encrypt(fbyte);
    fileDs = new ByteArrayDataSource(fileEncrypt, "text/xml");
    fileDh = new DataHandler(fileDs);
    fileAtt = new AttachmentPart(fileDh);
    fileAtt.setContentId(i+".docx");
    attachments.add(fileAtt);
    i++;
   }
   if (attachments != null && !attachments.isEmpty()) {
    call.setProperty(call.ATTACHMENT_ENCAPSULATION_FORMAT,call.ATTACHMENT_ENCAPSULATION_FORMAT_DIME); // 是用DIME附件和.net服务端对应
    for (Iterator iterator = attachments.iterator(); iterator.hasNext();) {
     AttachmentPart attachment = (AttachmentPart) iterator.next();
     call.addAttachmentPart(attachment);
    }
   }
  
  call.addParameter("fileName", XMLType.XSD_STRING, ParameterMode.IN);
  Object[] param = new Object[1];
  param[0]="sss.docx";
  call.setOperationName(method);
  call.setUseSOAPAction(true);
  call.setReturnType(org.apache.axis.Constants.XSD_STRING);

  call.setSOAPActionURI(nameSpace+method);
  call.setUseSOAPAction(true);
  obj = call.invoke(param);

 

调时,如果单个文件大于1MB就报下面错,多个文件如果都小于1MB的没有任何问题 。

AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultSubcode:
 faultString: java.net.SocketException: Connection reset
 faultActor:
 faultNode:
 faultDetail:
 {http://xml.apache.org/axis/}stackTrace:java.net.SocketException: Connection reset
 at java.net.SocketInputStream.read(Unknown Source)
 at java.io.BufferedInputStream.fill(Unknown Source)
 at java.io.BufferedInputStream.read(Unknown Source)
 at java.io.FilterInputStream.read(Unknown Source)
 at org.apache.xerces.impl.XMLEntityManager$RewindableInputStream.read(Unknown Source)
 at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
 at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown Source)
 at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
 at org.apache.xerces.parsers.XML11Configuration.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(Unknown Source)
 at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
 at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
 at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
 at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
 at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
 at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
 at org.apache.axis.client.Call.invoke(Call.java:2767)
 at org.apache.axis.client.Call.invoke(Call.java:2443)
 at org.apache.axis.client.Call.invoke(Call.java:2366)
 at org.apache.axis.client.Call.invoke(Call.java:1812)
 at fe.docexchange.utils.encrypt.RSAJava.send(RSAJava.java:345)
 at fe.docexchange.utils.encrypt.RSAJava.main(RSAJava.java:195)

 {http://xml.apache.org/axis/}hostname:S56C-PC

java.net.SocketException: Connection reset
 at org.apache.axis.AxisFault.makeFault(AxisFault.java:101)
 at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:701)
 at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
 at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
 at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
 at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
 at org.apache.axis.client.Call.invoke(Call.java:2767)
 at org.apache.axis.client.Call.invoke(Call.java:2443)
 at org.apache.axis.client.Call.invoke(Call.java:2366)
 at org.apache.axis.client.Call.invoke(Call.java:1812)
 at fe.docexchange.utils.encrypt.RSAJava.send(RSAJava.java:345)
 at fe.docexchange.utils.encrypt.RSAJava.main(RSAJava.java:195)
Caused by: java.net.SocketException: Connection reset
 at java.net.SocketInputStream.read(Unknown Source)
 at java.io.BufferedInputStream.fill(Unknown Source)
 at java.io.BufferedInputStream.read(Unknown Source)
 at java.io.FilterInputStream.read(Unknown Source)
 at org.apache.xerces.impl.XMLEntityManager$RewindableInputStream.read(Unknown Source)
 at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
 at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown Source)
 at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
 at org.apache.xerces.parsers.XML11Configuration.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(Unknown Source)
 at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
 at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
 ... 10 more

小-_-戴的主页 小-_-戴 | 初学一级 | 园豆:9
提问于:2013-01-30 15:20
< >
分享
所有回答(1)
0

Hi,do you resolved your the issue? I meet the same one

小柑 | 园豆:6 (初学一级) | 2015-01-07 14:39
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册