axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anne Thomas Manes" <atma...@gmail.com>
Subject Re: Null pointer exception
Date Thu, 07 Sep 2006 15:37:18 GMT
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 <TDoolitt@searshc.com> 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(OutInAxisOperation.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(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
>
> 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: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Mime
View raw message