Jack Sprat wrote:
*/Jeremy <[EMAIL PROTECTED]>/* wrote:

    Jack Sprat wrote:
    > I believe I found the bug in the
    > org.apache.axis2.transport.http.HTTPTransportUtils class. The
    > following "if" condition lacks a set of parentheses:
    >
    > if ((msgContext.getEnvelope() == null) && soapVersion !=
    > VERSION_SOAP11) {
    > msgContext.setEnvelope(new
    > SOAP12Factory().getDefaultEnvelope());
    > }
    >

    The != operator takes precedence over the && operator. So the
    parentheses are not necessary (actually, the first set isn't
    necessary
    either - it just helps with readability).

    Jeremy

OK. But why was the condition satisfied when the envelope was *NOT* null and the soapVersion was equal to 1? I have inspected and re-inspected these variables in the Eclipse WTP debugger but I just cannot see why this condition would be satisfied. I try to step into the SOAP12Factory().getDefaultEnvelope() method and the exception is immediately thrown.

What is the value of the constant VERSION_SOAP11? Are you sure it's 1? Check and make sure.

Before the if block, try logging a statement like soapVersion == VERSION_SOAP11. (or assign it to a bool variable and inspect it in the debugger). If it's true, then the if condition is firing incorrectly and you have something really weird going on. If it's false, then things are not as you expect them to be (which is almost always the case when debugging :-))

JEremy

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to