-
Notifications
You must be signed in to change notification settings - Fork 317
Open
Labels
type: bugA general bugA general bug
Milestone
Description
Wss4jSecurityInterceptor escapses CDATA which is not supposed.
Step to reproduce:
execute test in com.example.demo.WebServiceTest
and trace logs shows
2022-01-07 17:57:21.469 TRACE 17976 --- [ main] o.s.ws.client.MessageTracing.sent : Sent request [<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Header><wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" SOAP-ENV:mustUnderstand="1"><wsse:UsernameToken wsu:Id="UsernameToken-9768067b-0d6c-4b73-8cec-7a7dcc13acb1"><wsse:Username>Bob</wsse:Username><wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">password</wsse:Password></wsse:UsernameToken></wsse:Security></SOAP-ENV:Header><SOAP-ENV:Body><echo><req>Hello World!</req></echo></SOAP-ENV:Body></SOAP-ENV:Envelope>]
If WebServiceTemplate execute the test without Wss4jSecurityInterceptor
then trace log shows
2022-01-07 17:58:53.354 TRACE 16852 --- [ main] o.s.ws.client.MessageTracing.sent : Sent request [<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Header/><SOAP-ENV:Body><echo><![CDATA[<req>Hello World!</req>]]></echo></SOAP-ENV:Body></SOAP-ENV:Envelope>]
The later result is expected.
Metadata
Metadata
Assignees
Labels
type: bugA general bugA general bug