0

We prepare multipart SOAP request using SAAJ implementation provided by WAS 8.5.5 and it looks to be correct until we don't add XOP link referencing attachment being sent as a part:

<xop:Include href="cid:my_attachment_id" xmlns:xop="http://www.w3.org/2004/08/xop/include"/>

Once such link is added into envelope, it's replaced by SAAJ with base64-encoded content of attachment. As a result, attachment is sent twice, in binary and base64 forms.

Any idea how such unexpected inlining could be prevented?

UPD trying to followup the comment

We fill element named "data" of type base64Binary and then check the request with wireshark. Say we have 2 cases:

1) Non-XOP link like below is sent as is, confirmed by wireshark

<data><link href="cid:my_attachment_id"/></data>

2) XOP link formed initially as

<data><xop:Include href="cid:my_attachment_id" 
           xmlns:xop="http://www.w3.org/2004/08/xop/include"/></data>

according to wireshark is translated into

<data>PGh0dHA6Ly9mb28uY29tPg0KW2Zvb10oaHR0cDov....</data>

The content of "data" element here is exactly base64-encoded attachment identified by the given content-id (my_attachment_id).

user3714601
  • 1,156
  • 9
  • 27

0 Answers0