Access service path parameters from a CXF message

I am writing an interceptor to check the requests I see. However, I cannot determine how to access the path parameters (any parameter, for that matter). Although when I extend the message object in eclipse, the debug console, I see what I want, but since it is an element in the array, I am not sure which interface to use to access it.

What I see in eclipse (debugger):

enter image description here

My interceptor:

public class ValidationInterceptor extends AbstractPhaseInterceptor<Message> { public ValidationInterceptor() { super(Phase.PRE_INVOKE); } public void init() {} public void handleMessage(Message message) throws Fault { OperationResourceInfo a = message.getExchange().get(OperationResourceInfo.class); Method methodMetaData = a.getMethodToInvoke(); List<Parameter> metadataParameters = a.getParameters(); // ? How to access the parameters of the actual method invoked ... } } 

I would appreciate any help / pointers. Thanks.

+4
source share

Source: https://habr.com/ru/post/1480986/


All Articles