[
https://issues.apache.org/jira/browse/AXIS2-1706?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12469000
]
Deepal Jayasinghe commented on AXIS2-1706:
------------------------------------------
Hi ;
If you have method like
public void logout(String sessionState) throws Exception
then you should not use RPCMessageReceiver , there you need to use
RPCInOnlyMessageReceiver.
And I hope that will solve your problem.
> Null pointer in RPCMessageReceiver. invokeBusinessLogic when QName is null
> for outAxisMessage when returning from void web service call.
> ----------------------------------------------------------------------------------------------------------------------------------------
>
> Key: AXIS2-1706
> URL: https://issues.apache.org/jira/browse/AXIS2-1706
> Project: Axis 2.0 (Axis2)
> Issue Type: Bug
> Components: rpc
> Affects Versions: 1.1
> Environment: Windows XP with Axis2 1.1 running under Tomcat 5.0.28.
> Also, using JDK 1.4.2_10.
> Reporter: David R. Kraus
> Assigned To: Deepal Jayasinghe
>
> Issue is logged as Major for now, but soon (1-2 months) we will go into
> production with this so this may become a Blocker for us. We need the ability
> to create web service API methods which do not return a value.
> Description:
> Simple Logout web service API method simply disconnects an application
> session and then experiences a null pointer exception when returning back
> through Axis layer. The Logout methout has no return value(void).
> Exception occurs on outaxismessage.getElementQName().getNamespaceURI() call
> because the element QName is null (RPCMessageReceiver. invokeBusinessLogic ).
> AxisMessage outaxisMessage =
> op.getMessage(WSDLConstants.MESSAGE_LABEL_OUT_VALUE);
> if (inAxisMessage != null) {
> messageNameSpace =
> outaxisMessage.getElementQName().getNamespaceURI(); //null pointer
> }
> Earlier in the method, inaxisMessage.getElementQName is checked for a null
> value, leading me to believe that the listed code is in error.
> Using Eclipse in debug mode, I skipped the offending code, and the operation
> finished with no error, leading me to believe that a simple check for null
> would work. Also, when I added a String return value to the method everything
> worked fine.
> Web Service method signature is:
> public void logout(String sessionState) throws Exception;
> ...and no value is returned.
> WSDL of the full Web Service follows. Logout is the method which causes the
> exception. Logout2 is the the exact same method with a String return value,
> which has no problem.
> ==============Start WSDL==========================
> <wsdl:definitions xmlns:axis2="http://ws.apache.org/axis2"
> xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
> xmlns:ns0="http://ws.apache.org/axis2/xsd"
> xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
> xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
> 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/"
> targetNamespace="http://ws.apache.org/axis2"><wsdl:documentation>WusfDemo</wsdl:documentation><wsdl:types><xs:schema
> xmlns:ns="http://ws.apache.org/axis2/xsd" attributeFormDefault="qualified"
> elementFormDefault="qualified"
> targetNamespace="http://ws.apache.org/axis2/xsd">
> <xs:element name="executeReportAsGraphFault">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="executeReportAsGraphFault" type="xs:anyType" />
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> <xs:element name="executeReportAsGraph">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="sessionState" nillable="true" type="xs:string" />
> <xs:element name="reportName" nillable="true" type="xs:string" />
> <xs:element name="reportID" nillable="true" type="xs:string" />
> <xs:element name="resultFlags" nillable="true" type="xs:int" />
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> <xs:element name="executeReportAsGraphResponse">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="return" nillable="true" type="xs:string" />
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> <xs:element name="executeReportAsGridFault">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="executeReportAsGridFault" type="xs:anyType" />
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> <xs:element name="executeReportAsGrid">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="sessionState" nillable="true" type="xs:string" />
> <xs:element name="reportName" nillable="true" type="xs:string" />
> <xs:element name="reportID" nillable="true" type="xs:string" />
> <xs:element name="resultFlags" nillable="true" type="xs:int" />
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> <xs:element name="executeReportAsGridResponse">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="return" nillable="true" type="xs:string" />
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> <xs:element name="loginFault">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="loginFault" type="xs:anyType" />
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> <xs:element name="login">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="serverName" nillable="true" type="xs:string" />
> <xs:element name="projectName" nillable="true" type="xs:string" />
> <xs:element name="userName" nillable="true" type="xs:string" />
> <xs:element name="password" nillable="true" type="xs:string" />
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> <xs:element name="loginResponse">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="return" nillable="true" type="xs:string" />
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> <xs:element name="logout2Fault">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="logout2Fault" type="xs:anyType" />
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> <xs:element name="logout2">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="sessionState" nillable="true" type="xs:string" />
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> <xs:element name="logout2Response">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="return" nillable="true" type="xs:string" />
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> <xs:element name="logoutFault">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="logoutFault" type="xs:anyType" />
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> <xs:element name="logout">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="sessionState" nillable="true" type="xs:string" />
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> </xs:schema></wsdl:types><wsdl:message
> name="executeReportAsGridMessage"><wsdl:part name="part1"
> element="ns0:executeReportAsGrid" /></wsdl:message><wsdl:message
> name="executeReportAsGridResponse"><wsdl:part name="part1"
> element="ns0:executeReportAsGridResponse" /></wsdl:message><wsdl:message
> name="executeReportAsGridFault"><wsdl:part name="part1"
> element="ns0:executeReportAsGridFault" /></wsdl:message><wsdl:message
> name="loginMessage"><wsdl:part name="part1" element="ns0:login"
> /></wsdl:message><wsdl:message name="loginResponse"><wsdl:part name="part1"
> element="ns0:loginResponse" /></wsdl:message><wsdl:message
> name="loginFault"><wsdl:part name="part1" element="ns0:loginFault"
> /></wsdl:message><wsdl:message name="logout2Message"><wsdl:part name="part1"
> element="ns0:logout2" /></wsdl:message><wsdl:message
> name="logout2Response"><wsdl:part name="part1" element="ns0:logout2Response"
> /></wsdl:message><wsdl:message name="logout2Fault"><wsdl:part name="part1"
> element="ns0:logout2Fault" /></wsdl:message><wsdl:message
> name="executeReportAsGraphMessage"><wsdl:part name="part1"
> element="ns0:executeReportAsGraph" /></wsdl:message><wsdl:message
> name="executeReportAsGraphResponse"><wsdl:part name="part1"
> element="ns0:executeReportAsGraphResponse" /></wsdl:message><wsdl:message
> name="executeReportAsGraphFault"><wsdl:part name="part1"
> element="ns0:executeReportAsGraphFault" /></wsdl:message><wsdl:message
> name="logoutMessage"><wsdl:part name="part1" element="ns0:logout"
> /></wsdl:message><wsdl:message name="logoutResponse" /><wsdl:message
> name="logoutFault"><wsdl:part name="part1" element="ns0:logoutFault"
> /></wsdl:message><wsdl:portType name="WusfDemoPortType"><wsdl:operation
> name="executeReportAsGrid"><wsdl:input
> xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"
> message="axis2:executeReportAsGridMessage"
> wsaw:Action="urn:executeReportAsGrid" /><wsdl:output
> message="axis2:executeReportAsGridResponse" /><wsdl:fault
> message="axis2:executeReportAsGridFault" name="executeReportAsGridFault"
> /></wsdl:operation><wsdl:operation name="login"><wsdl:input
> xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"
> message="axis2:loginMessage" wsaw:Action="urn:login" /><wsdl:output
> message="axis2:loginResponse" /><wsdl:fault message="axis2:loginFault"
> name="loginFault" /></wsdl:operation><wsdl:operation
> name="logout2"><wsdl:input
> xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"
> message="axis2:logout2Message" wsaw:Action="urn:logout2" /><wsdl:output
> message="axis2:logout2Response" /><wsdl:fault message="axis2:logout2Fault"
> name="logout2Fault" /></wsdl:operation><wsdl:operation
> name="executeReportAsGraph"><wsdl:input
> xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"
> message="axis2:executeReportAsGraphMessage"
> wsaw:Action="urn:executeReportAsGraph" /><wsdl:output
> message="axis2:executeReportAsGraphResponse" /><wsdl:fault
> message="axis2:executeReportAsGraphFault" name="executeReportAsGraphFault"
> /></wsdl:operation><wsdl:operation name="logout"><wsdl:input
> xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"
> message="axis2:logoutMessage" wsaw:Action="urn:logout" /><wsdl:output
> message="axis2:logoutResponse" /><wsdl:fault message="axis2:logoutFault"
> name="logoutFault" /></wsdl:operation></wsdl:portType><wsdl:binding
> name="WusfDemoSOAP11Binding" type="axis2:WusfDemoPortType"><soap:binding
> transport="http://schemas.xmlsoap.org/soap/http" style="document"
> /><wsdl:operation name="executeReportAsGrid"><soap:operation
> soapAction="urn:executeReportAsGrid" style="document"
> /><wsdl:input><soap:body use="literal" /></wsdl:input><wsdl:output><soap:body
> use="literal" /></wsdl:output><wsdl:fault
> name="executeReportAsGridFault"><soap:body use="literal"
> /></wsdl:fault></wsdl:operation><wsdl:operation name="login"><soap:operation
> soapAction="urn:login" style="document" /><wsdl:input><soap:body
> use="literal" /></wsdl:input><wsdl:output><soap:body use="literal"
> /></wsdl:output><wsdl:fault name="loginFault"><soap:body use="literal"
> /></wsdl:fault></wsdl:operation><wsdl:operation
> name="logout2"><soap:operation soapAction="urn:logout2" style="document"
> /><wsdl:input><soap:body use="literal" /></wsdl:input><wsdl:output><soap:body
> use="literal" /></wsdl:output><wsdl:fault name="logout2Fault"><soap:body
> use="literal" /></wsdl:fault></wsdl:operation><wsdl:operation
> name="executeReportAsGraph"><soap:operation
> soapAction="urn:executeReportAsGraph" style="document"
> /><wsdl:input><soap:body use="literal" /></wsdl:input><wsdl:output><soap:body
> use="literal" /></wsdl:output><wsdl:fault
> name="executeReportAsGraphFault"><soap:body use="literal"
> /></wsdl:fault></wsdl:operation><wsdl:operation name="logout"><soap:operation
> soapAction="urn:logout" style="document" /><wsdl:input><soap:body
> use="literal" /></wsdl:input><wsdl:output><soap:body use="literal"
> /></wsdl:output><wsdl:fault name="logoutFault"><soap:body use="literal"
> /></wsdl:fault></wsdl:operation></wsdl:binding><wsdl:binding
> name="WusfDemoSOAP12Binding" type="axis2:WusfDemoPortType"><soap12:binding
> transport="http://schemas.xmlsoap.org/soap/http" style="document"
> /><wsdl:operation name="executeReportAsGrid"><soap12:operation
> soapAction="urn:executeReportAsGrid" style="document"
> /><wsdl:input><soap12:body use="literal"
> /></wsdl:input><wsdl:output><soap12:body use="literal"
> /></wsdl:output><wsdl:fault name="executeReportAsGridFault"><soap12:fault
> use="literal" name="executeReportAsGridFault"
> /></wsdl:fault></wsdl:operation><wsdl:operation
> name="login"><soap12:operation soapAction="urn:login" style="document"
> /><wsdl:input><soap12:body use="literal"
> /></wsdl:input><wsdl:output><soap12:body use="literal"
> /></wsdl:output><wsdl:fault name="loginFault"><soap12:fault use="literal"
> name="loginFault" /></wsdl:fault></wsdl:operation><wsdl:operation
> name="logout2"><soap12:operation soapAction="urn:logout2" style="document"
> /><wsdl:input><soap12:body use="literal"
> /></wsdl:input><wsdl:output><soap12:body use="literal"
> /></wsdl:output><wsdl:fault name="logout2Fault"><soap12:fault use="literal"
> name="logout2Fault" /></wsdl:fault></wsdl:operation><wsdl:operation
> name="executeReportAsGraph"><soap12:operation
> soapAction="urn:executeReportAsGraph" style="document"
> /><wsdl:input><soap12:body use="literal"
> /></wsdl:input><wsdl:output><soap12:body use="literal"
> /></wsdl:output><wsdl:fault name="executeReportAsGraphFault"><soap12:fault
> use="literal" name="executeReportAsGraphFault"
> /></wsdl:fault></wsdl:operation><wsdl:operation
> name="logout"><soap12:operation soapAction="urn:logout" style="document"
> /><wsdl:input><soap12:body use="literal"
> /></wsdl:input><wsdl:output><soap12:body use="literal"
> /></wsdl:output><wsdl:fault name="logoutFault"><soap12:fault use="literal"
> name="logoutFault"
> /></wsdl:fault></wsdl:operation></wsdl:binding><wsdl:binding
> name="WusfDemoHttpBinding" type="axis2:WusfDemoPortType"><http:binding
> verb="POST" /><wsdl:operation name="executeReportAsGrid"><http:operation
> location="executeReportAsGrid" /><wsdl:input><mime:content type="text/xml"
> /></wsdl:input><wsdl:output><mime:content type="text/xml"
> /></wsdl:output></wsdl:operation><wsdl:operation name="login"><http:operation
> location="login" /><wsdl:input><mime:content type="text/xml"
> /></wsdl:input><wsdl:output><mime:content type="text/xml"
> /></wsdl:output></wsdl:operation><wsdl:operation
> name="logout2"><http:operation location="logout2" /><wsdl:input><mime:content
> type="text/xml" /></wsdl:input><wsdl:output><mime:content type="text/xml"
> /></wsdl:output></wsdl:operation><wsdl:operation
> name="executeReportAsGraph"><http:operation location="executeReportAsGraph"
> /><wsdl:input><mime:content type="text/xml"
> /></wsdl:input><wsdl:output><mime:content type="text/xml"
> /></wsdl:output></wsdl:operation><wsdl:operation
> name="logout"><http:operation location="logout" /><wsdl:input><mime:content
> type="text/xml" /></wsdl:input><wsdl:output><mime:content type="text/xml"
> /></wsdl:output></wsdl:operation></wsdl:binding><wsdl:service
> name="WusfDemo"><wsdl:port name="WusfDemoSOAP11port_http"
> binding="axis2:WusfDemoSOAP11Binding"><soap:address
> location="http://localhost:8080/axis2/services/WusfDemo"
> /></wsdl:port><wsdl:port name="WusfDemoSOAP12port_http"
> binding="axis2:WusfDemoSOAP12Binding"><soap12:address
> location="http://localhost:8080/axis2/services/WusfDemo"
> /></wsdl:port><wsdl:port name="WusfDemoHttpport1"
> binding="axis2:WusfDemoHttpBinding"><http:address
> location="http://localhost:8080/axis2/rest/WusfDemo"
> /></wsdl:port></wsdl:service></wsdl:definitions>
> =====================end WSDL==================
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]