How to make authorization preemptive using SOAPEnvelope mime headers?
SOAPEnvelope envelope = soapPart.getEnvelope();
MimeHeaders mimeHeaders = soapMessage.getMimeHeaders();
mimeHeaders.addHeader("Content-type", "text/xml");
String authorization = new sun.misc.BASE64Encoder().encode(("user:pass").getBytes());
mimeHeaders.addHeader("Authorization", "Basic " + authorization);