You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Noah Levitt (JIRA)" <ji...@apache.org> on 2006/02/28 02:16:57 UTC

[jira] Created: (AXIS2-465) unhelpful nullpointerexception from .../foo?wsdl when web service class has no public methods

unhelpful nullpointerexception from .../foo?wsdl when web service class has no public methods
---------------------------------------------------------------------------------------------

         Key: AXIS2-465
         URL: http://issues.apache.org/jira/browse/AXIS2-465
     Project: Apache Axis 2.0 (Axis2)
        Type: Bug
    Reporter: Noah Levitt
    Priority: Minor


I created a service class with one method and I forgot to scope it public, and I got this response when attempting to view the wsdl, which didn't really help me identify the problem:

<wsdl:definitions xmlns:ns1="http://org.apache.axis2/xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://org.apache.axis2/" targetNamespace="http://org.apache.axis2/"><wsdl:types><xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ns2="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://www.w3.org/2001/XMLSchema" ns1:elementFormDefault="unqualified" ns0:attributeFormDefault="unqualified" ns2:targetNamespace="http://org.apache.axis2/xsd" /><?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header /><soapenv:Body><soapenv:Fault><faultcode>Client</faultcode><faultstring>null; nested exception is: 
	java.lang.NullPointerException</faultstring><faultactor></faultactor><detail><Exception xmlns="">org.apache.axis2.AxisFault: null; nested exception is: 
	java.lang.NullPointerException
	at org.apache.axis2.description.AxisService.printUsingWOM(AxisService.java:428)
	at org.apache.axis2.description.AxisService.printWSDL(AxisService.java:342)
	at org.apache.axis2.transport.http.ListingAgent.listService(ListingAgent.java:466)
	at org.apache.axis2.transport.http.ListingAgent.handle(ListingAgent.java:390)
	at org.apache.axis2.transport.http.AxisServlet.doGet(AxisServlet.java:118)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
	at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:667)
	at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
	at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
	at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.NullPointerException
	at org.apache.axis2.wsdl.writer.WOMtoWSDL11Writer.writePorttypeOperations(WOMtoWSDL11Writer.java:499)
	at org.apache.axis2.wsdl.writer.WOMtoWSDL11Writer.writePortTypes(WOMtoWSDL11Writer.java:464)
	at org.apache.axis2.wsdl.writer.WOMtoWSDL11Writer.writeWOM(WOMtoWSDL11Writer.java:162)
	at org.apache.axis2.description.AxisService.printUsingWOM(AxisService.java:425)
	... 20 more
</Exception></detail></soapenv:Fault></soapenv:Body></soapenv:Envelope>

-- 
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


[jira] Commented: (AXIS2-465) unhelpful nullpointerexception from .../foo?wsdl when web service class has no public methods

Posted by "Deepal Jayasinghe (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS2-465?page=comments#action_12368659 ] 

Deepal Jayasinghe commented on AXIS2-465:
-----------------------------------------

I just try to re-create the problem 

My Service class is like below;

public class MyClass {

    private void doNothing() {

    }
}


And I type ?wsdl I got the following wsdl.


	<wsdl:definitions targetNamespace="http://org.apache.axis2/">

	<wsdl:types>
<xs:schema targetNamespace="http://org.apache.axis2/xsd" elementFormDefault="unqualified" attributeFormDefault="unqualified"/>
</wsdl:types>
<wsdl:portType name="MyServicePort"/>

	<wsdl:binding name="MyServiceBinding" type="tns:MyServicePort">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
</wsdl:binding>

	<wsdl:service name="MyService">

	<wsdl:port name="MyServicePortType0" binding="tns:MyServiceBinding">
<soap:address location="http://192.168.1.220:6060/axis2/services/MyService"/>
</wsdl:port>

	<wsdl:port name="MyServicePortType1" binding="tns:MyServiceBinding">
<soap:address location="tcp://192.168.1.220:6061/axis2/services/MyService"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>



I think I can colse the issue :) 

> unhelpful nullpointerexception from .../foo?wsdl when web service class has no public methods
> ---------------------------------------------------------------------------------------------
>
>          Key: AXIS2-465
>          URL: http://issues.apache.org/jira/browse/AXIS2-465
>      Project: Apache Axis 2.0 (Axis2)
>         Type: Bug
>     Reporter: Noah Levitt
>     Priority: Minor

>
> I created a service class with one method and I forgot to scope it public, and I got this response when attempting to view the wsdl, which didn't really help me identify the problem:
> <wsdl:definitions xmlns:ns1="http://org.apache.axis2/xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://org.apache.axis2/" targetNamespace="http://org.apache.axis2/"><wsdl:types><xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ns2="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://www.w3.org/2001/XMLSchema" ns1:elementFormDefault="unqualified" ns0:attributeFormDefault="unqualified" ns2:targetNamespace="http://org.apache.axis2/xsd" /><?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header /><soapenv:Body><soapenv:Fault><faultcode>Client</faultcode><faultstring>null; nested exception is: 
> 	java.lang.NullPointerException</faultstring><faultactor></faultactor><detail><Exception xmlns="">org.apache.axis2.AxisFault: null; nested exception is: 
> 	java.lang.NullPointerException
> 	at org.apache.axis2.description.AxisService.printUsingWOM(AxisService.java:428)
> 	at org.apache.axis2.description.AxisService.printWSDL(AxisService.java:342)
> 	at org.apache.axis2.transport.http.ListingAgent.listService(ListingAgent.java:466)
> 	at org.apache.axis2.transport.http.ListingAgent.handle(ListingAgent.java:390)
> 	at org.apache.axis2.transport.http.AxisServlet.doGet(AxisServlet.java:118)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
> 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
> 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
> 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
> 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
> 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
> 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
> 	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
> 	at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:667)
> 	at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
> 	at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
> 	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
> 	at java.lang.Thread.run(Thread.java:595)
> Caused by: java.lang.NullPointerException
> 	at org.apache.axis2.wsdl.writer.WOMtoWSDL11Writer.writePorttypeOperations(WOMtoWSDL11Writer.java:499)
> 	at org.apache.axis2.wsdl.writer.WOMtoWSDL11Writer.writePortTypes(WOMtoWSDL11Writer.java:464)
> 	at org.apache.axis2.wsdl.writer.WOMtoWSDL11Writer.writeWOM(WOMtoWSDL11Writer.java:162)
> 	at org.apache.axis2.description.AxisService.printUsingWOM(AxisService.java:425)
> 	... 20 more
> </Exception></detail></soapenv:Fault></soapenv:Body></soapenv:Envelope>

-- 
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


[jira] Resolved: (AXIS2-465) unhelpful nullpointerexception from .../foo?wsdl when web service class has no public methods

Posted by "Deepal Jayasinghe (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS2-465?page=all ]
     
Deepal Jayasinghe resolved AXIS2-465:
-------------------------------------

    Fix Version: 0.95
     Resolution: Fixed

I tested that and I did not get the error , I think I have fixed that some times ago

> unhelpful nullpointerexception from .../foo?wsdl when web service class has no public methods
> ---------------------------------------------------------------------------------------------
>
>          Key: AXIS2-465
>          URL: http://issues.apache.org/jira/browse/AXIS2-465
>      Project: Apache Axis 2.0 (Axis2)
>         Type: Bug
>     Reporter: Noah Levitt
>     Priority: Minor
>      Fix For: 0.95

>
> I created a service class with one method and I forgot to scope it public, and I got this response when attempting to view the wsdl, which didn't really help me identify the problem:
> <wsdl:definitions xmlns:ns1="http://org.apache.axis2/xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://org.apache.axis2/" targetNamespace="http://org.apache.axis2/"><wsdl:types><xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ns2="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://www.w3.org/2001/XMLSchema" ns1:elementFormDefault="unqualified" ns0:attributeFormDefault="unqualified" ns2:targetNamespace="http://org.apache.axis2/xsd" /><?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header /><soapenv:Body><soapenv:Fault><faultcode>Client</faultcode><faultstring>null; nested exception is: 
> 	java.lang.NullPointerException</faultstring><faultactor></faultactor><detail><Exception xmlns="">org.apache.axis2.AxisFault: null; nested exception is: 
> 	java.lang.NullPointerException
> 	at org.apache.axis2.description.AxisService.printUsingWOM(AxisService.java:428)
> 	at org.apache.axis2.description.AxisService.printWSDL(AxisService.java:342)
> 	at org.apache.axis2.transport.http.ListingAgent.listService(ListingAgent.java:466)
> 	at org.apache.axis2.transport.http.ListingAgent.handle(ListingAgent.java:390)
> 	at org.apache.axis2.transport.http.AxisServlet.doGet(AxisServlet.java:118)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
> 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
> 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
> 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
> 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
> 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
> 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
> 	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
> 	at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:667)
> 	at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
> 	at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
> 	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
> 	at java.lang.Thread.run(Thread.java:595)
> Caused by: java.lang.NullPointerException
> 	at org.apache.axis2.wsdl.writer.WOMtoWSDL11Writer.writePorttypeOperations(WOMtoWSDL11Writer.java:499)
> 	at org.apache.axis2.wsdl.writer.WOMtoWSDL11Writer.writePortTypes(WOMtoWSDL11Writer.java:464)
> 	at org.apache.axis2.wsdl.writer.WOMtoWSDL11Writer.writeWOM(WOMtoWSDL11Writer.java:162)
> 	at org.apache.axis2.description.AxisService.printUsingWOM(AxisService.java:425)
> 	... 20 more
> </Exception></detail></soapenv:Fault></soapenv:Body></soapenv:Envelope>

-- 
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