@Override public AxiomSoapMessage createWebServiceMessage(InputStream inputStream) throws IOException { Assert.isInstanceOf( TransportInputStream.class, inputStream, "AxiomSoapMessageFactory requires a TransportInputStream"); if (inputFactory == null) { inputFactory = createXmlInputFactory(); } TransportInputStream transportInputStream = (TransportInputStream) inputStream; String contentType = getHeaderValue(transportInputStream, TransportConstants.HEADER_CONTENT_TYPE); if (!StringUtils.hasLength(contentType)) { if (logger.isDebugEnabled()) { logger.debug( "TransportInputStream has no Content-Type header; defaulting to \"" + SoapVersion.SOAP_11.getContentType() + "\""); } contentType = SoapVersion.SOAP_11.getContentType(); } String soapAction = getHeaderValue(transportInputStream, TransportConstants.HEADER_SOAP_ACTION); if (!StringUtils.hasLength(soapAction)) { soapAction = SoapUtils.extractActionFromContentType(contentType); } try { if (isMultiPartRelated(contentType)) { return createMultiPartAxiomSoapMessage(inputStream, contentType, soapAction); } else { return createAxiomSoapMessage(inputStream, contentType, soapAction); } } catch (XMLStreamException ex) { throw new AxiomSoapMessageCreationException( "Could not parse request: " + ex.getMessage(), ex); } catch (OMException ex) { throw new AxiomSoapMessageCreationException( "Could not create message: " + ex.getMessage(), ex); } }