.indexOf(SOAP12Constants.SOAP_12_CONTENT_TYPE)
> -1) {
soap11 = false;
//it is SOAP 1.2
builder =
new StAXSOAPModelBuilder(
xmlreader,
SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI);
envelope = (SOAPEnvelope) builder.getDocumentElement();
} else if (
contentType.indexOf(
SOAP11Constants.SOAP_11_CONTENT_TYPE)
> -1) {
soap11 = true;
//it is SOAP 1.1
Object enable =
msgContext.getProperty(
Constants.Configuration.ENABLE_REST);
if ((soapActionHeader == null
|| soapActionHeader.length() == 0)
&& Constants.VALUE_TRUE.equals(enable)) {
//If the content Type is text/xml (BTW which is the SOAP 1.1 Content type ) and
//the SOAP Action is absent it is rest !!
msgContext.setDoingREST(true);
SOAPFactory soapFactory = new SOAP11Factory();
builder = new StAXOMBuilder(xmlreader);
builder.setOmbuilderFactory(soapFactory);
envelope = soapFactory.getDefaultEnvelope();
envelope.getBody().addChild(
builder.getDocumentElement());
} else {
builder =
new StAXSOAPModelBuilder(
xmlreader,
SOAP11Constants
.SOAP_ENVELOPE_NAMESPACE_URI);
envelope =
(SOAPEnvelope) builder.getDocumentElement();