请教如何才能在soap附件中得到inputStream中的内容? 建议写到临时文件中再发送。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 AttachmentPart attachment = soapMessage.createAttachmentPart()byte[] bytes=new byte[1024000];InputStream in=new FileInputStream(new File("c:\\test.jpg"));in.read(bytes);ByteArrayInputStream stream = new ByteArrayInputStream(bytes);attachment.setContent(stream, "image/jpeg");attachment.setContentId("test_content");soapMessage.addAttachmentPart(attachment); 关于证书的问题,有点疑惑,大神帮忙 java 应用程序只允许打开一个 哪个用过网络框架MINA? jar文件运行时向物理盘写入文件问题 刚开始学习j2ee,该怎样理解数据源 如何将ResultSet作为blob字段的值写进数据库,请给详细的代码。 急::那位大哥有用java写的将oracle数据库里的表导成文本文件实例??(在线等,给分) resin下安装某论坛,提示找到不snoop的servlet. 高分求教,这些验证信息是什么意思?怎样消除。 关于J2EE学习步骤的问题. 寻求一款JAVA小应用程序。急需!! 小弟第一次接触web service 还请各位多帮忙!
byte[] bytes=new byte[1024000];
InputStream in=new FileInputStream(new File("c:\\test.jpg"));
in.read(bytes);
ByteArrayInputStream stream = new ByteArrayInputStream(bytes);
attachment.setContent(stream, "image/jpeg");
attachment.setContentId("test_content");
soapMessage.addAttachmentPart(attachment);