Hi, You can also save the header as a message property in the interceptor which you read it.
Then in the method body do like PhaseInterceptorChain.getCurrentMessage() to get the message and get the property ------------- Freeman(Yue) Fang Red Hat, Inc. FuseSource is now part of Red Hat Web: http://fusesource.com | http://www.redhat.com/ Twitter: freemanfang Blog: http://freemanfang.blogspot.com http://blog.sina.com.cn/u/1473905042 weibo: @Freeman小屋 On 2013-11-5, at 下午9:11, Mark Streit wrote: > 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
