Colleagues,
I have SOAP web-service based on CXF implementation with enabled SSL & WSS configuration (cofigured using WSP). I have test tool for testing this service also written using CXF.
Positive cases are working. Trying to test negative cases with security errors (wrong certificate / signature).
I have requirement from customer that in case of security errors return fault:401
and HTTP response code 401.
Problem: When I return HTTP code 401 from web-service on receiver side (in test tool) I receive Marshaling errors because of incoming internal InputStream is empty (without content). When I return any other HTTP code (200/403/419/500/503) - there isn't any problem on receiver side! And I'm able to see SOAP fault with message generated in web-service side.
Questions:
- Maybe there are some specific handling 401 HTTP code in CXF ?
- Maybe there are some specific requirements in SOAP in general ?
If returning 401 HTTP code in SOAP it's bad practice could you please provide documents/source code to prove this behavior and help me change customer requirements. I tried to look throw the code and haven't find place where this case handles
P.S: Tried to capture traffic using WireShark and RawCap and tried to decode it without success.