contentID = bp.getContentID();
}
soapMessagePart = bp;
bmMultipart.removeBodyPart(bp);
} catch (Exception e) {
throw new SOAPExceptionImpl(e);
}
}
}
ContentType soapPartCType = new ContentType(
soapMessagePart.getContentType());
initCharsetProperty(soapPartCType);
String baseType = soapPartCType.getBaseType().toLowerCase();
if(!(isEqualToSoap1_1Type(baseType)
|| isEqualToSoap1_2Type(baseType)
|| isSOAPBodyXOPPackage(soapPartCType))) {
log.log(Level.SEVERE,
"SAAJ0549.soap.part.invalid.Content-Type",
new Object[] {baseType});
throw new SOAPExceptionImpl(
"Bad Content-Type for SOAP Part : " +
baseType);
}
SOAPPart soapPart = getSOAPPart();
setMimeHeaders(soapPart, soapMessagePart);
soapPart.setContent(isFastInfoset ?
(Source) FastInfosetReflection.FastInfosetSource_new(
soapMessagePart.getInputStream()) :
(Source) new StreamSource(soapMessagePart.getInputStream()));
} else {
log.severe("SAAJ0534.soap.unknown.Content-Type");
throw new SOAPExceptionImpl("Unrecognized Content-Type");
}
} catch (Throwable ex) {
log.severe("SAAJ0535.soap.cannot.internalize.message");
throw new SOAPExceptionImpl("Unable to internalize message", ex);
}
needsSave();
}