We have done this using the Log4J MDC, (we use standard JAX-WS handlers but u would think the same would be possible or interceptors). As the handler gets the parameters, they can be persisted to the MDC as key/value pairs using MDC.put(). The @WebMethods will then have visibility to the MDC where you can just use MDC.get().
Perhaps that could work for your case. In ours, we had to pass a transaction ID over the wire where it could be matched between the client and server side. On Tuesday, November 5, 2013, adu wrote: > I have a SOAP web service developed using Apache CXF. The web service will > be > passed a parameter in the SOAP header that I must pass to the web service > method. How can I obtain this parameter in the web service method? > For eg. my web service method is getCustomerByName(String name). > The request SOAP header will have a parameter, authentication=ticket. How > can I get this value (ticket) inside the method. > I tried Interceptors - they allow to get the Header details but where do I > store this and get it in the method body. IS there a shared context or a > property that I can set? > > > > -- > View this message in context: > http://cxf.547215.n5.nabble.com/How-to-share-data-between-soap-header-and-web-service-methods-in-apache-cxf-tp5735950.html > Sent from the cxf-user mailing list archive at Nabble.com. > -- Regards, Mark Sent from Gmail Mobile on iPhone
