Reputation: 119
I want to get the ID of the Inbound message in my implemented service end point which has following parameters available:
@Context HttpServletRequest
e.g. From below inbound message i want to retrieve ID: 1 in my service endpoint. INFO: Inbound Message
ID: 1 Address: Encoding: ISO-8859-1 Http-Method: POST Content-Type: application/xml Headers: Payload:
Can anyone please tell me if there is a way to get that ID ?
Upvotes: 0
Views: 596
Reputation: 2122
You can get the current CXF Message using PhaseInterceptorChain.getCurrentMessage(). The logging ID used by the logging interceptors is stored in the Message Map, and can be retrieved with its key, e.g.
String loggingId = (String) PhaseInterceptorChain.getCurrentMessage().get(LoggingMessage.ID_KEY);
Upvotes: 1