[
https://issues.apache.org/jira/browse/AXIS2-5506?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13861230#comment-13861230
]
Vishwanatha Salian commented on AXIS2-5506:
-------------------------------------------
Steps to reproduce the issue:
1. Develop a WebService. This should throw an Exception (AxisFault) from a
service method. [Maps to Faults in WSDL]
2. Auto generate the wsdl by invoking WebService URL from web browser using
?wsdl query string. Example:
https://localhost:8080/YourApp/services/YourService?wsdl
2. Copy the generated wsdl to <YourApp>/WEB-INF/services/YourService/META-INF/
3. Restart the tomcat. (I used Tomcat 7.0.32)
4. Invoke the WebService. Make sure that the service throws an AixisFault. You
will get NullPointerException from the client.
> useOriginalwsdl + service exceptions = NullPointerException
> -----------------------------------------------------------
>
> Key: AXIS2-5506
> URL: https://issues.apache.org/jira/browse/AXIS2-5506
> Project: Axis2
> Issue Type: Bug
> Affects Versions: 1.6.1, 1.6.2
> Environment: Windows XP, IBM WebSphere 7, Java 1.6.0_24-b07
> Reporter: Wouter Amerijckx
>
> In both Axis2 1.6.1 and 1.6.2, an issue occurs when using an "original" WSDL
> file for a service that throws exceptions in its service methods.
> The issue occurs with:
> - Spring integration with Spring 2.0.8
> - The service packaged in an AAR
> > services.xml's useOriginalwsdl=true
> > META-INF/serviceName.WSDL in place
> Initially, I deployed the AAR without useOriginalwsdl and without a custom
> WSDL file. Axis2 generated the WSDL,
> I downloaded it through my web browser and put it in
> META-INF/serviceName.WSDL.
> For now, I left the file unmodified but am planning to modify it later (i.e.,
> its minOccurs values).
> The issue occurs when a service method completes but throws an exception.
> Without the "original WSDL", Axis2
> serializes this exception perfectly to XML. With the original WSDL in place,
> the following SOAP message is returned
> by the service:
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
> <soapenv:Body>
> <soapenv:Fault>
> <faultcode>soapenv:Server</faultcode>
> <faultstring>java.lang.NullPointerException</faultstring>
> <detail/>
> </soapenv:Fault>
> </soapenv:Body>
> </soapenv:Envelope>
> and the following stack trace appears in the logs:
> Version 1.6.1:
> ERROR org.apache.axis2.transport.http.AxisServlet -
> java.lang.NullPointerException
> at
> org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:179)
> at
> org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:40)
> at
> org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:110)
> at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:181)
> at
> org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:172)
> at
> org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:146)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:738)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
> at
> com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1657)
> at
> com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1597)
> at
> com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:131)
> ....
> Version 1.6.2:
> ERROR org.apache.axis2.transport.http.AxisServlet -
> java.lang.NullPointerException
> at
> org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:181)
> at
> org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:40)
> at
> org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:114)
> at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:181)
> at
> org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:172)
> at
> org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:146)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:738)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
> at
> com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1657)
> ....
> I made an attempt to debug the code, and it seems that
> inMessage.getAxisService().getTypeTable() is null, which is not the case
> when not using an "original WSDL".
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]