SWS-510 - AxiomSoapMessageFactory throws IllegalArgument when Content-Type is not set

This commit is contained in:
Arjen Poutsma
2009-05-14 12:14:54 +00:00
parent cd05c54822
commit 378cf9bbb3

View File

@@ -199,7 +199,8 @@ public class AxiomSoapMessageFactory implements SoapMessageFactory, Initializing
TransportInputStream transportInputStream = (TransportInputStream) inputStream;
String contentType = getHeaderValue(transportInputStream, TransportConstants.HEADER_CONTENT_TYPE);
if (!StringUtils.hasLength(contentType)) {
throw new IllegalArgumentException("TransportInputStream contains no Content-Type header");
logger.debug("TransportInputStream has no Content-Type header; defaulting to text/xml");
contentType = SoapVersion.SOAP_11.getContentType();
}
String soapAction = getHeaderValue(transportInputStream, TransportConstants.HEADER_SOAP_ACTION);
if (!StringUtils.hasLength(soapAction)) {