为了获取附件,我在端点中有以下代码:
@PayloadRoot(localPart = REQUEST_ELEMENT, namespace = MODELES_V1_0_URI)
@ResponsePayload
public Source saveFile(MessageContext argo) throws Exception {
(AxiomSoapMessage)MessageContextHolder.getMessageContext().getRequest();
AxiomSoapMessage request = (AxiomSoapMessage)argo.getRequest();
Attachment attachement= request.getAttachments().next();
但是附件实现了 AxiomAttachment(我正在使用 AxiomSoapMessageFactory)并且根据此类“Axiom 不支持获取附件的大小。”。
我怎样才能得到附件的大小?
我尝试使用它以便能够发送大文件(超过 10 个月)作为附件以防止内存不足(任何更好的想法将不胜感激 - 我已经尝试了 mtom spring 示例,但它不适用于重文件(outOfMemory 也是),甚至通过指定 AxiomSoapMessageFactory)。
我愿意接受任何更好的解决方案(spring ws mtom 示例不起作用..)来处理带有 spring ws 的重文件