[ 
https://issues.apache.org/jira/browse/CXF-7666?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17266925#comment-17266925
 ] 

Stephen Patten commented on CXF-7666:
-------------------------------------

Same issue here, would like to keep logging the MTOM request/response except 
the binary property. 

The CXF DataHandler on the server can receive base64 encoded, and byte[] 
documents, which are processed and returned by yet another DataHandler that 
support any number of media-types, typically "application/octet-stream", 
"image/tiff",  "application/pdf" . The code below shows an example service 
response and the "binary" property is this

<Buffer><xop:Include xmlns:xop="http://www.w3.org/2004/08/xop/include"; 
href="cid:ca829d80-30e5-40f8-a841-66b62f1ece42-2@PLFileNetWS"/></Buffer>

 
{code:java}
2021-01-17 15:47:13.006  INFO [,0a70f2ff4553a887,0a70f2ff4553a887] 67556 --- 
[nio-8443-exec-6] o.a.c.services.PLFileNetWSSoap.RESP_OUT  : RESP_OUT
    Address: https://localhost:8443/fnws/DocumentServices/v3
    Content-Type: multipart/related; type="application/xop+xml"; 
boundary="uuid:03854f91-65a2-4e63-b5f5-9f36543735cf"; 
start="<root.mess...@cxf.apache.org>"; start-info="application/soap+xml"
    ResponseCode: 200
    ExchangeId: 62c2ef67-4e44-490e-9743-dab10b2f3617
    ServiceName: PLFileNetWS
    PortName: PLFileNetWSSoap12
    PortTypeName: PLFileNetWSSoap
    Headers: {}
    Payload: 
--uuid:03854f91-65a2-4e63-b5f5-9f36543735cf
Content-Type: application/xop+xml; charset=UTF-8; type="application/soap+xml"
Content-Transfer-Encoding: binary
Content-ID: <root.mess...@cxf.apache.org><soap:Envelope 
xmlns:soap="http://www.w3.org/2003/05/soap-envelope";><soap:Body><DownloadBinaryResponse
 
xmlns="PLFileNetWS"><DownloadBinaryResult><DocumentProperties><IndexProperty><Name>File0</Name><Value
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:xs="http://www.w3.org/2001/XMLSchema"; xsi:type="xs:string">MED2jaleh - 
recent.TIF</Value></IndexProperty><IndexProperty><Name>DateCreated</Name><Value 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:xs="http://www.w3.org/2001/XMLSchema"; 
xsi:type="xs:string">2020-12-14</Value></IndexProperty><IndexProperty><Name>ContentSize</Name><Value
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:xs="http://www.w3.org/2001/XMLSchema"; 
xsi:type="xs:string">533284.0</Value></IndexProperty><IndexProperty><Name>MimeType</Name><Value
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:xs="http://www.w3.org/2001/XMLSchema"; 
xsi:type="xs:string">image/tiff</Value></IndexProperty><IndexProperty><Name>ClassDescription</Name><Value
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:xs="http://www.w3.org/2001/XMLSchema"; 
xsi:type="xs:string">New_Business</Value></IndexProperty><IndexProperty><Name>F_DOCNUMBER</Name><Value
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:xs="http://www.w3.org/2001/XMLSchema"; 
xsi:type="xs:string">6024255</Value></IndexProperty><IndexProperty><Name>Id</Name><Value
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:xs="http://www.w3.org/2001/XMLSchema"; 
xsi:type="xs:string">{C0B66276-0000-CF18-8300-F34099B13C2A}</Value></IndexProperty><IndexProperty><Name>DocumentTitle</Name><Value
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:xs="http://www.w3.org/2001/XMLSchema"; 
xsi:type="xs:string">6024255</Value></IndexProperty></DocumentProperties><Buffer><xop:Include
 xmlns:xop="http://www.w3.org/2004/08/xop/include"; 
href="cid:ca829d80-30e5-40f8-a841-66b62f1ece42-2@PLFileNetWS"/></Buffer></DownloadBinaryResult></DownloadBinaryResponse></soap:Body></soap:Envelope>
--uuid:03854f91-65a2-4e63-b5f5-9f36543735cf
Content-Type: image/tiff
Content-Transfer-Encoding: binary
Content-ID: <ca829d80-30e5-40f8-a841-66b62f1ece42-2@PLFileNetWS>X  �  
  u  Z         �   �  M  5        �   �        �          C    
I  �   �   �  �  z  i  �  s  �  b  c   �  �   ^  �   }   �   �     
 �  >   V   W   �   �   �  5   O  �  �   �  w   #   �   �   `   L    �  
�  �  _  �  �   �   r   V   G   �       �   i   M   �                 
          �  .  c  T   �                     ��� ���� ���� �� 
,!@����\��0��i�����䁒���ɏ�?�'���_�����޿lk���Cg��������_� � ,fنl�D2(��
���޿J�����K��K���1%�(�K��������\DDG�� @��� ���u��b�
�A
{code}
Yes, I did add image/tiff but to no avail.

 

Thank you,

Stephen

 

 

> Binary multipart payload are shown even if logBinary Flag is set to false
> -------------------------------------------------------------------------
>
>                 Key: CXF-7666
>                 URL: https://issues.apache.org/jira/browse/CXF-7666
>             Project: CXF
>          Issue Type: Bug
>          Components: logging
>    Affects Versions: 3.2.1
>            Reporter: Mohamed Moez MANSOURI
>            Priority: Major
>
> **
> Iam using
> {code:java}
>                  <dependency>
>                       <groupId>org.apache.cxf</groupId>
>                       <artifactId>cxf-rt-features-logging</artifactId>
>                         <version>3.2.1</version>
>               </dependency>
> {code}
> And i still have logs of binary parts of a multipart message (image/png) even 
> if the flag "logBinary" of AbstractLoggingInterceptor is false by default.
>  Can you help me ? I would like that if that flag is false , it applies also 
> to the inner parts of a multipart message.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to