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.