Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 8628 invoked from network); 11 Sep 2006 18:52:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 11 Sep 2006 18:52:51 -0000 Received: (qmail 90590 invoked by uid 500); 11 Sep 2006 18:52:47 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 90550 invoked by uid 500); 11 Sep 2006 18:52:47 -0000 Mailing-List: contact axis-dev-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-dev@ws.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-dev@ws.apache.org Received: (qmail 90536 invoked by uid 99); 11 Sep 2006 18:52:47 -0000 Received: from idunn.apache.osuosl.org (HELO idunn.apache.osuosl.org) (140.211.166.84) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Sep 2006 11:52:47 -0700 X-ASF-Spam-Status: No, hits=0.5 required=5.0 tests=WEIRD_PORT Received: from ([209.237.227.198:41754] helo=brutus.apache.org) by idunn.apache.osuosl.org (ecelerity 2.1 r(10620)) with ESMTP id 86/62-25981-780B5054 for ; Mon, 11 Sep 2006 11:52:55 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id EDE8141000E for ; Mon, 11 Sep 2006 18:49:22 +0000 (GMT) Message-ID: <29017568.1158000562944.JavaMail.jira@brutus> Date: Mon, 11 Sep 2006 11:49:22 -0700 (PDT) From: "Todd Doolittle (JIRA)" To: axis-dev@ws.apache.org Subject: [jira] Commented: (AXIS2-1124) Axis servlet throws null pointer when SOAPAction is "" In-Reply-To: <10802893.1157714543404.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/AXIS2-1124?page=comments#action_12433930 ] Todd Doolittle commented on AXIS2-1124: --------------------------------------- Deepal, I just downloaded the latest night release of the libraries and axis.war and I get the same results (NullPointerException) as above. Below I went through the steps I used to recreate the problem. I know it's related to the SOAPAction being "". If I change the WSDL so that the client will send a SOAPAction other than "" it works fine. I used the above WSDL. I used the following command to create the service... WSDL2Java -ss -sd -uri test.wsdl -o . I used the following command to create the client... WSDL2Java -s -uri test.wsdl -o . I created a client class to instantiate the stub and make the call: import org.tempuri.EchoStub; import org.tempuri.EchoStub.EchoedString; import org.tempuri.EchoStub.StringToEcho; public class Axis2ClientTest { public static void main(String[] args) throws Exception { EchoStub echo = new EchoStub("http://localhost:8090/axis2/services/Echo"); StringToEcho myString = new StringToEcho(); myString.setStringToEcho("Hello There!"); EchoedString returnString = echo.echoString(myString); System.out.println("returnString = " + returnString.getEchoedString()); } } I deployed the service to Tomcat 4 (using the latest nightly build axis.war). When I run the client I the following Envelope is send from the client to the service... Hello There! The client receives an Axis Fault which contains the NullPointerException that occured in the Axis Servlet. The stack trace is show below... Sep 11, 2006 2:46:31 PM org.apache.axis2.engine.AxisEngine receiveFault INFO: Received Error Message with id urn:uuid:210AE1FE5339CAFB3C11580003905001 Exception in thread "main" org.apache.axis2.AxisFault: java.lang.NullPointerException at org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:298) at org.tempuri.EchoStub.echoString(EchoStub.java:139) at Axis2ClientTest.main(Axis2ClientTest.java:14) Caused by: java.lang.Exception: org.apache.axis2.AxisFault: java.lang.NullPointerException; nested exception is: java.lang.NullPointerException at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:242) at javax.servlet.http.HttpServlet.service(HttpServlet.java:716) at javax.servlet.http.HttpServlet.service(HttpServlet.java:809) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:200) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:146) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:209) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:144) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2358) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:133) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:118) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:116) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:127) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:152) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683) at java.lang.Thread.run(Thread.java:534) Caused by: java.lang.NullPointerException at org.apache.axis2.addressing.AddressingHelper.getAnonymousParameterValue(AddressingHelper.java:78) at org.apache.axis2.handlers.addressing.AddressingWSDLValidationHandler.checkAnonymous(AddressingWSDLValidationHandler.java:71) at org.apache.axis2.handlers.addressing.AddressingWSDLValidationHandler.invoke(AddressingWSDLValidationHandler.java:43) at org.apache.axis2.engine.Phase.invoke(Phase.java:377) at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:517) at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:488) at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:324) at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:202) ... 31 more at org.apache.axis2.AxisFault.(AxisFault.java:159) ... 3 more > Axis servlet throws null pointer when SOAPAction is "" > ------------------------------------------------------ > > Key: AXIS2-1124 > URL: http://issues.apache.org/jira/browse/AXIS2-1124 > Project: Apache Axis 2.0 (Axis2) > Issue Type: Bug > Components: core > Environment: Java 1.4.2, Tomcat 4, Axis 2 nightly build from 9/7/2006 > Reporter: Todd Doolittle > Assigned To: Deepal Jayasinghe > Priority: Blocker > > This problem occurs with the latest nightly build. > In issue 1103 a bug was fixed that was causing a SOAP client to set the SOAPAction header to the operation name even though the WSDL used to create the stub specified that the SOAPAction was to be "" (empy string). This worked and now when the WSDL specifies a SOAPAction of "", the client sets the header appropriately. > However now an Axis 2 service generated from the same WSDL receiving a message with a SOAPAction of "" throws a null pointer exception. To illustrate the problem I created some simple WSDL for an "echo" service that specifies a soapaction="". If you use the latest nightly build to generate a service and client from the WSDL and don't change anything else you should receive an UnsupportedOperationException thrown by the skeleton since you never implemented the business logic. Instead when the service receives the SOAP message, it will puke on the empty SOAPAction header and throw a NullPointerException. Below is the WSDL. Below that is a stack trace. > > name="Echo" targetNamespace="http://tempuri.org/" > xmlns:fjs="http://tempuri.org/" > xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" > xmlns:xsd="http://www.w3.org/2001/XMLSchema"> > > targetNamespace="http://tempuri.org/" > xmlns:s1="http://tempuri.org/"> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > INFO: Received Error Message with id urn:uuid:ADD3D958422E63BE8411577144782181 > Exception in thread "main" org.apache.axis2.AxisFault: java.lang.NullPointerException > at org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:298) > at org.tempuri.EchoStub.echoString(EchoStub.java:138) > at Axis2ClientTest.main(Axis2ClientTest.java:20) > ^^^^^^^^^^^^^^^^^^^^^^^ The above part of the stack trace is my client reporting the returned AxisFault, below is the service portion of the stack track. > Caused by: java.lang.Exception: org.apache.axis2.AxisFault: java.lang.NullPointerException; nested exception is: > java.lang.NullPointerException > at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:241) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:716) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:809) > at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:200) > at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:146) > at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:209) > at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596) > at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433) > at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948) > at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:144) > at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596) > at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433) > at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948) > at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2358) > at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:133) > at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596) > at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:118) > at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594) > at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:116) > at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594) > at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433) > at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948) > at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:127) > at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596) > at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433) > at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948) > at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:152) > at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799) > at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705) > at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577) > at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683) > at java.lang.Thread.run(Thread.java:534) > Caused by: java.lang.NullPointerException > at org.apache.axis2.addressing.AddressingHelper.getAnonymousParameterValue(AddressingHelper.java:78) > at org.apache.axis2.handlers.addressing.AddressingWSDLValidationHandler.checkAnonymous(AddressingWSDLValidationHandler.java:71) > at org.apache.axis2.handlers.addressing.AddressingWSDLValidationHandler.invoke(AddressingWSDLValidationHandler.java:43) > at org.apache.axis2.engine.Phase.invoke(Phase.java:377) > at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:517) > at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:488) > at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:309) > at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:201) > ... 31 more > at org.apache.axis2.AxisFault.(AxisFault.java:159) > ... 3 more -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org For additional commands, e-mail: axis-dev-help@ws.apache.org