CXF Logging request & response with content filtering or masking soap fields

后端 未结 2 956
挽巷
挽巷 2020-12-09 19:55

I would like to log all incoming requests & responses from some particular endpoint, with content filtering. I.e. when i have a request like that:



        
2条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-09 20:08

    I have written an open source library aimed at effectively pretty-printing SOAP messages: xml-formatter-components-cxf. Features include:

    • High-performance reformatting of XML
    • Advanced filtering options
      • Max text and/or CDATA node sizes
      • Reformatting of XML within text and/or CDATA nodes
      • Anonymize of element and/or attribute contents
      • Removal of subtrees

    complete configuration reference for spring.

    Edit: The above library has been refactored to a more generic library which probably is better for most normal use-cases, i.e. no XML wrapped in XML.

提交回复
热议问题