I have migrated an existing Java SOAP Web Service application to Spring Boot. I referred this link to do so: https://spring.io/guides/gs/producing-web-service/
The endpoints work fine and I am able to map the requests from SOAP UI to their respective Endpoints.
Next task is to get Authentication credentials from the SOAP Request Header. Prior to this migration, the Authentication Credentials were being fetched from WebServiceContext.
However, I am unable to do so because WebServiceContext is always null in the application migrated to Spring Boot.
I am using @Resource annotation to get WebServiceContext. Please note that I have also tried setter injection.
Below is the sample code:
@Endpoint
public class TestEndpoint{
@Resource
WebServiceContext context; // Always null
}
Can we not use WebServiceContext in Spring Boot Application?
Is there any other way to get the credentials from Security header of SOAP request?