web services - Cxf interceptors as spring beans having autowired fields, using plain annotation configuration -


my problem quite same asked in other question: "how use spring autowired in custom cxf interceptor?". valid response there recommends configure endpoint through context xml:

<jaxws:endpoint id="mywebservice" address="/mywebservice">     <jaxws:ininterceptors>         <ref bean="myininterceptor" />     </jaxws:ininterceptors> </jaxws:endpoint> 

but want to without xml configurations, annotation. possible somehow add interceptor (which spring bean autowired members) @webservice endpoint through annotation @ininterceptors. or there way?

unfortunatly nobody give hint how solve problem through annotations since year. want inform how solved problem.

my work around programmatically within init() method of services bean:

    generatedbywsdl2javaservices services = new generatedbywsdl2javaservices();     igeneratedbywsdl2javaservices service = services.getbasichttpbindingigeneratedbywsdl2javaservices();     client clientproxy = clientproxy.getclient(service);     clientproxy.getininterceptors().add( new responsecheckinterceptor() ); 

where igeneratedbywsdl2javaservices cxf generated implementation , generatedbywsdl2javaservices corresponding interface.


Comments

Popular posts from this blog

python - TypeError: start must be a integer -

c# - DevExpress RepositoryItemComboBox BackColor property ignored -

django - Creating multiple model instances in DRF3 -