I would like to implement a JAX-WS Provider, that receives large MTOM
attachments. I would like to prevent the attachments from being cached in
memory; I would like to stream them to a temporary file (or the JAX-WS
implementation to stream them to a temporary file).
Theoretically I could get the MTOM attachmments with
SOAPMessage#getAttachments(), or with
WebServiceContext#getMessageContext()#get(INBOUND_MESSAGE_ATTACHMENTS), and
stream them into a temporary file.
The problem is that I've found no way to get the SOAP Part itself without
the attachments resolved (in memory). I've tried the PAYLOAD/MESSAGE
annotations, Source/SOAPMessage parameters, but no luck, the memory always
gets filled with the attachments.
Does anyone have an idea, or experience about this problem?
attachments. I would like to prevent the attachments from being cached in
memory; I would like to stream them to a temporary file (or the JAX-WS
implementation to stream them to a temporary file).
Theoretically I could get the MTOM attachmments with
SOAPMessage#getAttachments(), or with
WebServiceContext#getMessageContext()#get(INBOUND_MESSAGE_ATTACHMENTS), and
stream them into a temporary file.
The problem is that I've found no way to get the SOAP Part itself without
the attachments resolved (in memory). I've tried the PAYLOAD/MESSAGE
annotations, Source/SOAPMessage parameters, but no luck, the memory always
gets filled with the attachments.
Does anyone have an idea, or experience about this problem?