axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jack Sprat <rexclaim...@yahoo.com>
Subject Re: AxisServlet NullPointerException
Date Wed, 06 Jun 2007 19:29:48 GMT
JIRA AXIS2-2674 was logged when I first came across this problem.
All the details are in there but I have not yet attached the WAR file since Axis2 is included
within my web application.  This makes the WAR file very large due to all the included JAR
files.  The WAR file is about 12 MB.

You are correct on the attribute value.  The correct value is "qualified" and not "required"
- sorry for the confusion.

Regards,
T


Thilina Gunarathne <csethil@gmail.com> wrote: Jack,
Please log a Jira with the necessary resources  to reproduce the
error... A stripped down test case with a WSDL similar to your one
would be great... Also provide details about your environment too...

> After numerous trials and errors, the problem was alleviated by setting the
> elementFormDefault="required" on the WSDL and all included schemas.
is it elementFormDefault="required" or
elementFormDefault="qualified"... I'm not sure whether
elementFormDefault="required" is allowed...

Thanks,
Thilina

>
> Does anyone know why this would solve the problem?
>
> Regards.
> T
>
>
> Jack Sprat  wrote:
>  Jeremy  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.
>


       
---------------------------------
Park yourself in front of a world of choices in alternative vehicles.
Visit the Yahoo! Auto Green Center.
Mime
View raw message