> Author: shameera > Date: Sun May 5 14:33:41 2013 > New Revision: 1479332 > > URL: http://svn.apache.org/r1479332 > Log: > Fixed AXIS2-4221, check for soap body after build soap envelop > > Modified: > > axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/transport/TransportUtils.java > > Modified: > axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/transport/TransportUtils.java > URL: > http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/transport/TransportUtils.java?rev=1479332&r1=1479331&r2=1479332&view=diff > ============================================================================== > --- > axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/transport/TransportUtils.java > (original) > +++ > axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/transport/TransportUtils.java > Sun May 5 14:33:41 2013 > @@ -169,7 +169,7 @@ public class TransportUtils { > return createSOAPEnvelope(documentElement); > } > > - public static SOAPEnvelope createSOAPEnvelope(OMElement documentElement) > { > + public static SOAPEnvelope createSOAPEnvelope(OMElement documentElement) > throws AxisFault { > SOAPEnvelope envelope; > // Check whether we have received a SOAPEnvelope or not > if (documentElement instanceof SOAPEnvelope) { > @@ -183,6 +183,10 @@ public class TransportUtils { > envelope.getBody().addChild(documentElement); > } > } > + //According to both SOAP 1.1 and 1.2 specification SOAP body is > mandatory element for a valid soap envelop > + if (envelope.getBody() == null) { > + throw new AxisFault("soap body element is null, but it is > mandatory for a valid soap envelop"); What do you mean by 'SOAP body element is null' ? did you mean to say it is missing ?. And I am not 100% sure whether the SOAP body is mandatory (need to read the spec :)).
Deepal > + } > return envelope; > } > > > > -- Blog - http://blogs.deepal.org/ --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
