Anne, I've done some more research. I created an even simpler WSDL because I think I'm going to have to submit an issue. The WSDL is listed at the bottom of this message. This is just a simple "echo" service that takes a string and returns a string.
If the client code uses the jars from nightly build from 8/30 it works fine. If the client code uses the jars from either last night or the night before it doesn't work (NullPointerException from the service). I used tcpmon to watch the requests being sent by the client and found that the only difference is the SOAPAction header. The older build (the one that works) sent the SOAPAction as urn:echoString. The latest nightly build sends the SOAPAction header as "". The WSDL specifies the soapaction="", so technically the newer build is setting the SOAPAction header correctly, but the Axis Servlet throws a null pointer exception for some reason. The older build incorrectly sets the SOAPAction to urn:echoString, which is incorrect based on the WSDL, but the Axis Servlet at least doesn't throw a NullPointerException. Here is the ironic part. I'm the person who filed the issue to get SOAPAction header set to "" when the WSDL specifies the SOAPAction as "". This was necessary because a non-java SOAP service I am using specifies a soapaction="". When my Axis2 client sent them any other SOAPAction, their service would reply back with an "Unknown operation". I'll go ahead and file another issue to get the Axis Servlet fixed to handle the SOAPAction header being "". -----Original Message----- From: Doolittle, Todd Sent: Thursday, September 07, 2006 2:06 PM To: '[email protected]' Subject: RE: Null pointer exception Anne, Thanks for the help! Well after doing a little troubleshooting it appears that something major was broken over the last couple of night in the nightly build. I created a much simpler WSDL by hand that defines an "Address book" service. The only operation is "lookup". You pass it the last name of the person you want to look up in the address book, and it returns their address book entry (name, address, etc). I then created a client and service using wsdl2java (from last night's nightly build). I just leave the service skeleton code as is. It will just throw an UnsupportedOperationException when it received a request. I deployed the service. The tomcat server is using axis.war from last night's build. If I run the client using last night's build jar files I get the NullPointerException returned from the service (see below for a stack trace). If I run the client with the 8/30/2006 nightly build's jar files I get the UnsupportedOperationException as expected. Considering how simple this service is, I'd say something major was broken between 08/30 and 09/05's build. I output the envelopes from the client and they look the same. So it's probably something being sent in an http header that is causing the problem. I haven't gotten the SOAP Monitor up and running yet, so I can't tell. Below is my WSDL if someone wants to verify it. <?xml version="1.0" encoding="UTF-8" standalone="no" ?> <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" name="AddressBook" 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="personID"> <xsd:complexType> <xsd:sequence> <xsd:element name="lastName" type="xsd:string" /> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:element name="addressBookEntry"> <xsd:complexType> <xsd:sequence> <xsd:element name="lastName" type="xsd:string" /> <xsd:element name="firstName" type="xsd:string" /> <xsd:element name="address" type="xsd:string" /> <xsd:element name="city" type="xsd:string" /> <xsd:element name="state" type="xsd:string" /> <xsd:element name="zip" type="xsd:int" /> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:schema> </wsdl:types> <wsdl:message name="lookupIn"> <wsdl:part element="fjs:personID" name="parameters" /> </wsdl:message> <wsdl:message name="lookupOut"> <wsdl:part element="fjs:addressBookEntry" name="parameters" /> </wsdl:message> <wsdl:portType name="AddressBookPortType"> <wsdl:operation name="lookup"> <wsdl:input message="fjs:lookupIn" name="personID" /> <wsdl:output message="fjs:lookupOut" name="addressBookEntry" /> </wsdl:operation> </wsdl:portType> <wsdl:binding name="AddressBookBinding" type="fjs:AddressBookPortType"> <soap:binding transport="http://schemas.xmlsoap.org/soap/http" /> <wsdl:operation name="lookup"> <soap:operation soapAction="" style="document" /> <wsdl:input name="personID"> <soap:body use="literal" /> </wsdl:input> <wsdl:output name="addressBookEntry"> <soap:body use="literal" /> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:service name="AddressBook"> <wsdl:port binding="fjs:AddressBookBinding" name="AddressBookPortType"> <soap:address location="http://localhost:8090/AddressBook/AddressBook" /> </wsdl:port> </wsdl:service> </wsdl:definitions> Stack trace when using the 09/06 or 09/05 nightly build... Exception in thread "main" org.apache.axis2.AxisFault: java.lang.NullPointerException at org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisO peration.java:298) at org.tempuri.AddressBookStub.lookup(AddressBookStub.java:142) at Axis2ClientTest.main(Axis2ClientTest.java:21) 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(Applica tionFilterChain.java:200) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt erChain.java:146) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv e.java:209) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i nvokeNext(StandardPipeline.java:596) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4 33) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv e.java:144) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i nvokeNext(StandardPipeline.java:596) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4 33) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:235 8) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java :133) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i nvokeNext(StandardPipeline.java:596) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherVa lve.java:118) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i nvokeNext(StandardPipeline.java:594) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java :116) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i nvokeNext(StandardPipeline.java:594) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4 33) 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.i nvokeNext(StandardPipeline.java:596) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4 33) 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:79 9) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processC onnection(Http11Protocol.java:705) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:57 7) 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.che ckAnonymous(AddressingWSDLValidationHandler.java:71) at org.apache.axis2.handlers.addressing.AddressingWSDLValidationHandler.inv oke(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.processHTTPPostReques t(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 -----Original Message----- From: Anne Thomas Manes [mailto:[EMAIL PROTECTED] Sent: Thursday, September 07, 2006 1:18 PM To: [email protected] Subject: Re: Null pointer exception After fixing the targetNamespace attribute, the WSDL looks fine and validates properly. Perhaps there's a problem in the configuration? What's different between your original WSDL and the new one? Anne On 9/7/06, Doolittle, Todd <[EMAIL PROTECTED]> wrote: > > Anne, > > Sorry, that was just some sort of cut and paste error. The > targetNamespace attribute was/is quoted in the original WSDL. I'll > repaste it to the bottom of this message. > > I built my own WSDL by hand that is very similar to the one listed below > and for some reason that one works fine. Now I'm looking through the > difference between the two to try and figure out what Axis doesn't like > about the original. If anyone has any other ideas I'd appreciate > hearing them. > > <?xml version="1.0" encoding="UTF-8" standalone="no" ?> > <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" > name="POC" 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="lookup"> > <xsd:complexType> > <xsd:sequence> > <xsd:element maxOccurs="unbounded" minOccurs="0" > name="upc" nillable="true" type="xsd:string" /> > </xsd:sequence> > <xsd:attribute name="count" type="xsd:int" > use="required" /> > </xsd:complexType> > </xsd:element> > <xsd:element name="GetinfoResponse"> > <xsd:complexType> > <xsd:sequence> > <xsd:element name="items" nillable="true"> > <xsd:complexType> > <xsd:sequence> > <xsd:element maxOccurs="unbounded" > minOccurs="0" name="item" nillable="true"> > <xsd:complexType> > <xsd:sequence> > <xsd:element name="ksn" > nillable="true" type="xsd:int" /> > <xsd:element name="upc" > nillable="true" type="xsd:string" /> > <xsd:element > name="maintdt" nillable="true" type="xsd:date" > /> > <xsd:element name="dpt" > nillable="true" type="xsd:int" /> > </xsd:sequence> > </xsd:complexType> > </xsd:element> > </xsd:sequence> > </xsd:complexType> > </xsd:element> > </xsd:sequence> > <xsd:attribute name="count" type="xsd:int" > use="required" /> > </xsd:complexType> > </xsd:element> > </xsd:schema> > </wsdl:types> > <wsdl:message name="GetinfoIn"> > <wsdl:part element="fjs:lookup" name="parameters" /> > </wsdl:message> > <wsdl:message name="GetinfoOut"> > <wsdl:part element="fjs:GetinfoResponse" name="parameters" /> > </wsdl:message> > > -----Original Message----- > From: Anne Thomas Manes [mailto:[EMAIL PROTECTED] > Sent: Thursday, September 07, 2006 11:37 AM > To: [email protected] > Subject: Re: Null pointer exception > > The WSDL isn't valid: > > You need quotes around the value of the targetNamespace attribute in > this line: > > <xsd:schema elementFormDefault="qualified" > targetNamespace=http://tempuri.org/ > xmlns:s1="http://tempuri.org/"> > > Anne > > On 9/7/06, Doolittle, Todd <[EMAIL PROTECTED]> wrote: > > > > > > > > > > I successfully created a client for a web service that was created in > a > > non-java language using the latest nightly build of Axis 2 using > wsdl2java. > > I took the same WSDL and used wsdl2java to create a service in Axis2. > I > > deployed the service, and then pointed the known working client at it > and I > > get back an AxisFault specifying that there was a null pointer > exception on > > the service side. The problem istit doesn't look like the null > pointer > > exception had anything to do with my code. So I regenerated the > service > > using wsdl2java and left the skeleton as it was so it would just throw > an > > UnsupportedOperationException. I redeployed the service, and sent a > message > > using my client and I get back the same NullPointerException. Am I > doing > > something wrong? > > > > I'm using Java 1.4.2, Tomcat 4.1.31 and the latest nightly build. See > below > > for the WSDL and stack trace. Any help would be appreciated. > > > > Here is the WSDL... > > > > <?xml version="1.0" encoding="UTF-8" standalone="no" ?> > > > > <wsdl:definitions > > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" > > > > name="POC" 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="lookup"> > > > > <xsd:complexType> > > > > <xsd:sequence> > > > > <xsd:element maxOccurs="unbounded" minOccurs="0" > name="upc" > > nillable="true" type="xsd:string" /> > > > > </xsd:sequence> > > > > <xsd:attribute name="count" type="xsd:int" use="required" /> > > > > </xsd:complexType> > > > > </xsd:element> > > > > <xsd:element name="GetinfoResponse"> > > > > <xsd:complexType> > > > > <xsd:sequence> > > > > <xsd:element name="items" nillable="true"> > > > > <xsd:complexType> > > > > <xsd:sequence> > > > > <xsd:element maxOccurs="unbounded" minOccurs="0" > > name="item" nillable="true"> > > > > <xsd:complexType> > > > > <xsd:sequence> > > > > <xsd:element name="ksn" > > > > nillable="true" type="xsd:int" /> > > > > <xsd:element name="upc" > > > > nillable="true" type="xsd:string" /> > > > > <xsd:element name="maintdt" nillable="true" > > type="xsd:date" /> > > > > <xsd:element name="dpt" nillable="true" > > type="xsd:int" /> > > > > </xsd:sequence> > > > > </xsd:complexType> > > > > </xsd:element> > > > > </xsd:sequence> > > > > </xsd:complexType> > > > > </xsd:element> > > > > </xsd:sequence> > > > > <xsd:attribute name="count" type="xsd:int" use="required" /> > > > > </xsd:complexType> > > > > </xsd:element> > > > > </xsd:schema> > > > > </wsdl:types> > > > > <wsdl:message name="GetinfoIn"> > > > > <wsdl:part element="fjs:lookup" name="parameters" /> > > > > </wsdl:message> > > > > <wsdl:message name="GetinfoOut"> > > > > <wsdl:part element="fjs:GetinfoResponse" name="parameters" /> > > > > </wsdl:message> > > > > <wsdl:portType name="POCPortType"> > > > > <wsdl:operation name="Getinfo"> > > > > <wsdl:input message="fjs:GetinfoIn" name="lookup" /> > > > > <wsdl:output message="fjs:GetinfoOut" > > > > name="GetinfoResponse" /> > > > > </wsdl:operation> > > > > </wsdl:portType> > > > > <wsdl:binding name="POCBinding" type="fjs:POCPortType"> > > > > <soap:binding > > transport="http://schemas.xmlsoap.org/soap/http" /> > > > > <wsdl:operation name="Getinfo"> > > > > <soap:operation soapAction="" style="document" /> > > > > <wsdl:input name="lookup"> > > > > <soap:body use="literal" /> > > > > </wsdl:input> > > > > <wsdl:output name="GetinfoResponse"> > > > > <soap:body use="literal" /> > > > > </wsdl:output> > > > > </wsdl:operation> > > > > </wsdl:binding> > > > > <wsdl:service name="POC"> > > > > <wsdl:port binding="fjs:POCBinding" name="POCPortType"> > > > > <soap:address > > location="http://localhost:8080/axis2/services/POC" /> > > > > </wsdl:port> > > > > </wsdl:service> > > > > </wsdl:definitions> > > > > > > Here is the stack trace... > > > > Sep 7, 2006 7:39:26 AM org.apache.axis2.engine.AxisEngine > > receiveFault > > > > INFO: Received Error Message with id > > urn:uuid:242525EB38AC1132E811576291658151 > > > > org.apache.axis2.AxisFault: java.lang.NullPointerException > > > > at > > > org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisO > peration.java:298) > > > > at org.tempuri.POCStub.Getinfo(POCStub.java:128) > > > > at POCTest.main(POCTest.java:29) > > > > > > ^^^^^^^^^^^^ The portion above is just from my client. The portion > below is > > the portion from the service side... > > > > 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(Applica > tionFilterChain.java:200) > > > > at > > > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt > erChain.java:146) > > > > at > > > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv > e..java:209) > > > > at > > > org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i > nvokeNext(StandardPipeline.java:596) > > > > at > > > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4 > 33) > > > > at > > org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948) > > > > at > > > org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv > e..java:144) > > > > at > > > org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i > nvokeNext(StandardPipeline.java:596) > > > > at > > > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4 > 33) > > > > at > > org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948) > > > > at > > > org.apache.catalina.core.StandardContext.invoke(StandardContext.java:235 > 8) > > > > at > > > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java > :133) > > > > at > > > org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i > nvokeNext(StandardPipeline.java:596) > > > > at > > > org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherVa > lve.java:118) > > > > at > > > org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i > nvokeNext(StandardPipeline.java:594) > > > > at > > > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java > :116) > > > > at > > > org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i > nvokeNext(StandardPipeline.java:594) > > > > at > > > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4 > 33) > > > > 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.i > nvokeNext(StandardPipeline.java:596) > > > > at > > > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4 > 33) > > > > 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:79 > 9) > > > > at > > > org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processC > onnection(Http11Protocol.java:705) > > > > at > > > org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:57 > 7) > > > > 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.che > ckAnonymous(AddressingWSDLValidationHandler.java:71) > > > > at > > > org.apache.axis2.handlers.addressing.AddressingWSDLValidationHandler.inv > oke(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.processHTTPPostReques > t(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 > > > > Exception in thread "main" java.lang.NullPointerException > > > > at POCTest.main(POCTest.java:39) > > > > > > ________________________________ > > > > > > > > > > This message, including any attachments, is the property of Sears > Holdings > > Corporation and/or one of its subsidiaries. It is confidential and may > > contain proprietary or legally privileged information. If you are not > the > > intended recipient, please delete it without reading the contents. > Thank > > you. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
