Is this possible to somehow expose JAX-WS web service as spring bean? I need to set some objects into my implementation class, but I want to do this using spring.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You need to use SpringBeanAutowiringSupport and Autowired annotation to inject the object from spring. Create an endpoint class which will work like real web service but calls to real implementation methods goes throught your web service interface which is injected from spring.
For e.g:
Your JAX-WS enpoint configuration should look like this:
Define real implementation class in spring but remember that both: your endpoint class and implementation class must implement your web service interface.
And thats it, now you can use spring in your JAX-WS web service.