Hello everybody,
I have created a BasicAuthInterceptor based on this code: https://gist.github.com/palesz/3438143
It works well, but I have some problems. This interceptor cause two requests.
The response of the first request will be 401. After first response has arrived, the client automatically call the endpoint again with Authorization header. In my case SoapUI is the client.
How can I predefine the requirements to know the client, how should call my endpoint?
This is my code now:
//...
Map<String, Object> properties = jaxWsServerFactoryBean.getProperties();
//...
jaxWsServerFactoryBean.setProperties(properties);
final Server server = jaxWsServerFactoryBean.create();
Endpoint endpoint = server.getEndpoint();
endpoint.getInInterceptors().add(new BasicAuthInterceptor());```