I believe I found the source of this problem, though I still do not know why
the code in the HTTPTransportUtils class behaved like it did.
After numerous trials and errors, the problem was alleviated by setting the
elementFormDefault="required" on the WSDL and all included schemas.
Does anyone know why this would solve the problem?
Regards.
T
Jack Sprat <[EMAIL PROTECTED]> 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());
> }
>
> There needs to be a set of parenteses around the 2nd condition
> (soapVersion != VERSION_SOAP11) condition.
> The soapVersion variable had a value of 1 in this case so the
> condition should *NOT* have been satisfied. The operation within the
> "if" statement caused the exception.
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
That makes sense. I guess I was hoping that was the problem. The problem
remains - why is this "if" condition being satisfied when the msgContext
variable is *NOT* null and both the soapVersion and VERSION_SOAP11 variables
are equal to 1. I've inspected these variables in the Eclipse WTP debugger and
had 2 other developers look as well to ensure I was not missing something
obvious.
The NPE happens immediately when I try to step into the
SOAP12Factory().getDefaultEnvelope() method.
Could I send the WAR file for someone to try? It should be as simple as
dropping it into an app server and sending a request.
I'm completely at a loss here.
Thanks,
T.
---------------------------------
Choose the right car based on your needs. Check out Yahoo! Autos new Car
Finder tool.