cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ray Krueger" <raykrue...@gmail.com>
Subject Re: NullPointerException when ?wsdl url contains extra parameters.
Date Tue, 28 Aug 2007 13:35:45 GMT
Yeah that's why I opened the bug. I'm passing a properly formatted
query string, the default WSDLQuery handler should respect that. It
shouldn't require custom code to handle standard URLs.

On 8/28/07, Willem Jiang <ning.jiang@iona.com> wrote:
> Hi Ray,
>
> I traced the code and found that WSDLQueryHandler will take the string
> behind ?wsdl as the wsdl name. So when you query the wsdl from the
> service with the below url.
>
> http://localhost:8181/ws/soap/CurrencyExchange?wsdl&username=TEST&password=password
>
> WSDLQuery will  try to retrieve the wsdl with the name
> "username=TEST&password=password" , then a NPE will be thrown when
> WSDLQuery can't find the wsdl definition .
>
> If you want to protect your wsdl,  I think you can write your custom
> WSDLQueryHandler and add it to the QueryHandlerRegistry.
>
> Willem.
>
> Ray Krueger wrote:
> > I opened bug CXF-948 for this, but anyway; here's the problem.
> >
> > Deploying CXF via the CXFServlet, you will get a NullPointerException
> > when your URL contains extra parameters...
> >
> > This URL
> > http://localhost:8181/ws/soap/CurrencyExchange?wsdl&username=TEST&password=password
> >
> > Causes this stack trace...
> > javax.servlet.ServletException
> >       org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:133)
> >       org.apache.cxf.transport.servlet.CXFServlet.invoke(CXFServlet.java:271)
> >       org.apache.cxf.transport.servlet.CXFServlet.doGet(CXFServlet.java:253)
> > .........
> > java.lang.NullPointerException
> > org.apache.cxf.transport.http.WSDLQueryHandler.writeResponse(WSDLQueryHandler.java:140)
> >       org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:129)
> >       org.apache.cxf.transport.servlet.CXFServlet.invoke(CXFServlet.java:271)
> >
> >
> > The same url will blow with the following random stuff as well...
> >
> > http://localhost:8181/ws/soap/CurrencyExchange?wsdl&BOOM
> >
> > Anything after the ?wsdl seems to do the trick.
> >
> > If there's something I'm doing wrong here let me know and I'll try it.
> >
> >
>

Mime
View raw message