如何检索SOAP附件? 我正在做类似以下的事情:
Iterator<AttachmentPart> i = soapMessage.getAttachments();
while(i.hasNext())
{
AttachmentPart obj = i.next();
InputStream rawContent = obj.getRawContent();
}
原始内容返回如下内容:
------ = _ Part_2980_1570690085.1342564119748
content-type:image / png;名称= IMG_0583.png
content-transfer-encoding:BASE64
内容 - 配置:附件;文件名= IMG_0583.png
content-id:1
content-location:IMG_0583.png
内容长度:11210
iVBORw0KGgoAAAANSUhEUgAAARMAAABfCAMAAAD8mtMpAAAC / VBMVEUBIrIZH6qfBSGwAyWSDiTE Aym9DifSCyysGCiQISvJES3eDDLMFinYGDDdFyzkGjbmGzGhMTePNjwsSa3JKDQYTukOZh3iKDKK
------ = _ Part_2980_1570690085.1342564119748 -
如何检索上面以粗体突出显示的部分?
答案 0 :(得分:0)
我认为你想使用getContent
方法而不是原始方法:
obj.getContent();
或getBase64Content
方法,因为编码是base64