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 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. <?xml version="1.0" encoding="UTF-8" standalone="no" ?> <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 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"> <wsdl:types> <xsd:schema elementFormDefault="qualified" targetNamespace="http://tempuri.org/" xmlns:s1="http://tempuri.org/"> <xsd:element name="StringToEcho" type="xsd:string" /> <xsd:element name="EchoedString" type="xsd:string" /> </xsd:schema> </wsdl:types> <wsdl:message name="echoStringIn"> <wsdl:part element="fjs:StringToEcho" name="parameters" /> </wsdl:message> <wsdl:message name="echoStringOut"> <wsdl:part element="fjs:EchoedString" name="parameters" /> </wsdl:message> <wsdl:portType name="EchoPortType"> <wsdl:operation name="echoString"> <wsdl:input message="fjs:echoStringIn" name="StringToEcho" /> <wsdl:output message="fjs:echoStringOut" name="EchoedString" /> </wsdl:operation> </wsdl:portType> <wsdl:binding name="EchoBinding" type="fjs:EchoPortType"> <soap:binding transport="http://schemas.xmlsoap.org/soap/http" /> <wsdl:operation name="echoString"> <soap:operation soapAction="" style="document" /> <wsdl:input name="StringToEcho"> <soap:body use="literal" /> </wsdl:input> <wsdl:output name="EchoedString"> <soap:body use="literal" /> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:service name="Echo"> <wsdl:port binding="fjs:EchoBinding" name="EchoPortType"> <soap:address location="http://localhost:8080/axis2/services/Echo" /> </wsdl:port> </wsdl:service> </wsdl:definitions> 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.<init>(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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]