}
}
@Override
public SaajSoapMessage createWebServiceMessage(InputStream inputStream) throws IOException {
MimeHeaders mimeHeaders = parseMimeHeaders(inputStream);
try {
inputStream = checkForUtf8ByteOrderMark(inputStream);
SOAPMessage saajMessage = messageFactory.createMessage(mimeHeaders, inputStream);
saajMessage.getSOAPPart().getEnvelope();
postProcess(saajMessage);
return new SaajSoapMessage(saajMessage, langAttributeOnSoap11FaultString, messageFactory);
}
catch (SOAPException ex) {
// SAAJ 1.3 RI has a issue with handling multipart XOP content types which contain "startinfo" rather than
// "start-info", so let's try and do something about it
String contentType = StringUtils
.arrayToCommaDelimitedString(mimeHeaders.getHeader(TransportConstants.HEADER_CONTENT_TYPE));
if (contentType.contains("startinfo")) {
contentType = contentType.replace("startinfo", "start-info");
mimeHeaders.setHeader(TransportConstants.HEADER_CONTENT_TYPE, contentType);
try {
SOAPMessage saajMessage = messageFactory.createMessage(mimeHeaders, inputStream);
postProcess(saajMessage);
return new SaajSoapMessage(saajMessage,
langAttributeOnSoap11FaultString);