Hi all, Please point me any documents or sample code where an interceptor is used to set a property in message context.
I found following link where it mentions that we do not have access to the message context in an interceptor. http://depressedprogrammer.wordpress.com/2007/07/31/cxf-ws-security-using-jsr-181-interceptor-annotations-xfire-migration/ If we do not have access to message context, is there any other option we can set a property so that it is available in cxf service implementation? Thank you. On Tue, Jan 3, 2012 at 12:12 PM, Manjula Rathnayake <[email protected]>wrote: > 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. > -- Manjula Rathnayaka Department of Computer Science & Engineering, University Of Moratuwa, Moratuwa, Sri Lanka.
