Hi, we use a service with a plain userid/password. We use RAMPART to deal with this.
In case the clients passes a wrong userid or password (or none at all) we get an ugly NullPointerException (see below) . No SOAP Response is returned (we check with SOAPMonitor). This is of course very inconvenient for 3rd parties wishing to use our services. Is this a known 'bug' and is there a workaround ? Our Callback handler is: public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException { WSPasswordCallback pwcb = null; for (int i = 0; i < callbacks.length; i++) { pwcb = (WSPasswordCallback)callbacks[i]; String id = pwcb.getIdentifer(); LOGGER.info("PWCBHandler id: " + id + " PasswordType: " + pwcb.getPasswordType()); // Check if password is plain text if (pwcb.getUsage() == WSPasswordCallback.USERNAME_TOKEN_UNKNOWN) { if(!Admin.username.equals(id) || !Admin.password .equals(pwcb.getPassword())) { LOGGER.info("PWCBHandler id: " + id + " Invalid password: " + pwcb.getPassword()); throw new IOException(callbacks[i] + " ... check failed"); } } } } The error is the Tomcat logging is: SEVERE: Servlet.service() for servlet AxisServlet threw exception java.lang.NullPointerException at org.apache.rampart.RampartMessageData.<init>(RampartMessageData.java:308) at org.apache.rampart.MessageBuilder.build(MessageBuilder.java:61) at org.apache.rampart.handler.RampartSender.invoke(RampartSender.java:64) at org.apache.axis2.engine.Phase.invoke(Phase.java:318) at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:251) at org.apache.axis2.engine.AxisEngine.sendFault(AxisEngine.java:508) at org.apache.axis2.transport.http.AxisServlet.handleFault(AxisServlet.java:423) at org.apache.axis2.transport.http.AxisServlet.processAxisFault(AxisServlet.java:386) at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:176) at javax.servlet.http.HttpServlet.service(HttpServlet.java:637) -- View this message in context: http://old.nabble.com/Axis2-Java-1.5.1-and-Rampart-1.4-%28no-SoapFault-returned%29-tp26273931p26273931.html Sent from the Axis - Dev mailing list archive at Nabble.com.