FI_ENCODED_FLAG : 0) | MIME_MULTIPART_FLAG | SOAP1_2_FLAG;
} else if (isMimeMultipartXOPPackage(contentType)) {
return MIME_MULTIPART_XOP_FLAG;
} else {
log.severe("SAAJ0536.soap.content-type.mustbe.multipart");
throw new SOAPExceptionImpl(
"Content-Type needs to be Multipart/Related "
+ "and with \"type=text/xml\" "
+ "or \"type=application/soap+xml\"");
}
} else {
log.severe("SAAJ0537.soap.invalid.content-type");
throw new SOAPExceptionImpl(
"Invalid Content-Type: " + primary + '/' + sub);
}
}
else if (isSoap1_1Type(primary, sub)) {
return (primary.equalsIgnoreCase("application")
&& sub.equalsIgnoreCase("fastinfoset") ?
FI_ENCODED_FLAG : 0)
| PLAIN_XML_FLAG | SOAP1_1_FLAG;
}
else if (isSoap1_2Type(primary, sub)) {
return (primary.equalsIgnoreCase("application")
&& sub.equalsIgnoreCase("soap+fastinfoset") ?
FI_ENCODED_FLAG : 0)
| PLAIN_XML_FLAG | SOAP1_2_FLAG;
} else if(isSOAPBodyXOPPackage(contentType)){
return XOP_FLAG;
} else {
log.severe("SAAJ0537.soap.invalid.content-type");
throw new SOAPExceptionImpl(
"Invalid Content-Type:"
+ primary
+ '/'
+ sub
+ ". Is this an error message instead of a SOAP response?");