cxf - Identify a SOAP message as request or response -
i have middleware can accept soap request , can make soap request.
i have written custom interceptors intercept inbound , outbound request log them in database.
the issue when soap request made incoming request intercepted inbound interceptor , when module makes soap request intercepted outbound interceptor correct.
but identify incoming soap message weather soap request or soap response can log soap request , response correctly.
is there way identify soap message request or response ?
you can use cxf messageutils class that. e.g.:
boolean requestor = messageutils.isrequestor(message); boolean outbound = messageutils.isoutbound(message); if (requestor) { if (!outbound) { //this response message } } else { if (!outbound) { //this request message } }
Comments
Post a Comment