WebServiceContext remains null

Viewed 1383

I have two web services implemented with JAX-WS: RequestService and ExtendedRequestService.

ExtendedRequestService calls RequestService and adds additional data to the response. When calling RequestService, the WebServiceContext is injected, but when calling it from ExtendedRequestService, it is null and the code throws a NullPointerException.

How can I properly initialize it?

This is how I call RequestService from ExtendedRequestService:

RequestServiceImpl requestService = new RequestServiceImpl();
RequestServiceResponse requestServiceResponse = requestService.performRequest(requestServiceRequest);
1 Answers
Related