Hi Xilai

On Wed, Aug 24, 2011 at 2:44 AM, XiLai Dai <[email protected]> wrote:
> Hi, there,
>
> Now, we've implemented a Provide like this:
>
> @javax.xml.ws.ServiceMode(value = javax.xml.ws.Service.Mode.PAYLOAD)
> @javax.xml.ws.WebServiceProvider()
> public class ProviderBase implements 
> javax.xml.ws.Provider<javax.xml.transform.Source> {
>
>    //@javax.jws.WebMethod(exclude=true)
>        public final Source invoke(Source request) {
>        //how to transform request or return Source to Message, so we can add 
> some custom properties class to it:
>        CustomInfo customInfo = new CustomInfo();
>        message.put (CustomInfo.class, customInfo);
>    }
> }
>
> So, in the invoke() method, how to transform request or return Source to 
> Message?  so we can add some custom properties class to it, and then our 
> Interceptor class can get them.
>

I think you need to inject WebServiceContext and then set a property
on it, something like
wsContext.getMessageContext().put(CustomInfo.class.getName(),
customInfo);

and then access it on the outbound CXF Message inside the interceptor...

Cheers, Sergey


> Thanks!
> Xilai
>



-- 
Sergey Beryozkin

http://sberyozkin.blogspot.com
Talend - http://www.talend.com

Reply via email to