throws SOAPException {
try {
List hdr = mbp.getAllHeaders();
int sz = hdr.size();
for( int i=0; i<sz; i++ ) {
Header h = (Header)hdr.get(i);
if(h.getName().equalsIgnoreCase("Content-Type"))
continue; // skip
ap.addMimeHeader(h.getName(), h.getValue());
}
} catch (Exception ex) {
log.severe("SAAJ0506.soap.cannot.copy.mime.hdrs.into.attachment");
throw new SOAPExceptionImpl(
"Unable to copy MIME headers into attachment",