cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Manjula Rathnayake <manjula....@gmail.com>
Subject How to access a custom property in the backend service implementation
Date Tue, 03 Jan 2012 06:42:47 GMT
Hi all,

I am trying to achieve the $Subject.

I tried out to set the custom property to message context using an
interceptor and access the property in service implementation.
But I could not access the message context inside the
'handleMessage(Message message)'. So I set the property using
message.setContextualProperty("CUSTOM_PROPERTY","Custom property value.").

But inside the service implementation I could not get the custom property
value using the following code.
 @Resource
    WebServiceContext wsc;

    @WebMethod
    public String hello(String echo) {
        MessageContext messageContext = wsc.getMessageContext();
        String customProperty=   messageContext.get("CUSTOM_PROPERTY");
        return echo;
    }

So How can I set a custom property using an interceptor and access it
inside the service implementation?
Any help or suggestions are welcome.

Thank you.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message