Hello, I recently blogged an example[1] of setting (from the client) and
reading (from the web service provider) MessageContext properties that could
be read by the jax-ws handlers or created by the handlers, respectively:
SOAP client:
((BindingProvider) port).getRequestContext().put("MAX_VALUE", "200");
web service:
@Resource
private WebServiceContext context;
...
context.getMessageContext().get("termOne"));
I'd like to do the same for an Interceptor-based implemention, where the
client would set a property for a interceptor Message object that would be
readable by client-side interceptors, and the web service provider could
read a message property that was created by a service-side interceptor. I
can see how to get/set properties from within the interceptors, as they are
passed in a Message property they can work with, but am not sure how (or
even if) the client- and service-side endpoints can add/read property values
to/from a Message object as you can with JAX-WS handlers--in other words,
how do they get access to a Message object so they can add/read properties
to/from it?
Also, do interceptor Message properties offer a scoping attribute, similar
to the JAX-WS handler scoping concept of HANDLER/APPLICATION scope, where
properties with the latter scope can be subsequently read by the (client or
service) endpoint but those of the former can be read by the handlers only?
I couldn't see any from the Javadocs, but just wanted to confirm.
Thanks,
Glen
[1] http://www.jroller.com/gmazza/entry/jaxws_handler_tutorial
--
View this message in context:
http://old.nabble.com/Set-Get-Interceptor-Message-properties-from-client-service-endpoints--tp28421276p28421276.html
Sent from the cxf-user mailing list archive at Nabble.com.