Setting a custom HTTP header dynamically with Spring-WS client
How do you set a custom HTTP header (not SOAP header) dynamically on the client side when using Spring-WS? user366735 public class AddHttpHeaderInterceptor implements ClientInterceptor { public boolean handleFault(MessageContext messageContext) throws WebServiceClientException { return true; } public boolean handleRequest(MessageContext messageContext) throws WebServiceClientException { TransportContext context = TransportContextHolder.getTransportContext(); HttpComponentsConnection connection =(HttpComponentsConnection) context.getConnection(); connection.addRequestHeader("name", "suman");