Axis2
  1. Axis2
  2. AXIS2-4674

Unable to get WSDL2 doc for services on WebSphere 7.0 and Axis2 1.5.1

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.5.1
    • Fix Version/s: 1.5.4, 1.6.0
    • Component/s: wsdl
    • Labels:
      None
    • Environment:
      Linux Redhat, Websphere 7.0, Axis2, 1.5.1

      Description

      Accessing
      websphereurl:port/axis/services/MyService?wsdl2 throws a null pointer exception.

      E com.ibm.ws.webcontainer.servlet.ServletWrapper service SRVE0068E: Uncaught exception created in one of the service methods of the servlet AxisServlet in application axis2_war. Exception created : java.lang.NullPointerException
      at org.apache.axis2.description.AxisService.printWSDL2(AxisService.java:1594)
      at org.apache.axis2.transport.http.ListingAgent.processListService(ListingAgent.java:252)
      at org.apache.axis2.transport.http.AxisServlet.doGet(AxisServlet.java:249)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:718)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
      at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1443)
      at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:790)
      at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:443)
      at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:175)
      at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3610)
      at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:274)
      at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:926)
      at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1557)
      at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:173)
      at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:455)
      at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:384)
      at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:272)
      at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
      at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
      at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
      at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
      at com.ibm.io.async.AsyncChannelFuture$1.run(AsyncChannelFuture.java:205)
      at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1527)

      Problem lies on line 250 of org.apache.axis2.transport.http.ListingAgent.java. req.getParameter("wsdl2") returns null if the url does not contain the wsdl file name as a parameter.

      The following works:
      websphereurl:port/axis/services/MyService?wsdl2=
      websphereurl:port/axis/services/MyService?wsdl2=MyService.wsdl

        Issue Links

          Activity

          Hide
          Andreas Veithen added a comment -

          Targeting this for 1.5.4.

          Show
          Andreas Veithen added a comment - Targeting this for 1.5.4.
          Hide
          Pradeep Fernando added a comment -

          Hi,

          I look in to the issue, and noticed that it is still there in the current trunk version. (reproduced it). According to my observations, the root cause of the issue being the appserver specific behaviours.

          In Tomcat, if the request URL is MyService?wsdl2 it gives the wsdl2 request parameter as a empty string, where as in web sphere it gives a null string.
          The obvious solutions, as of my understanding is the do a null check before further processing.

          i did that modification and now the the above issue no longer visible. (I verified in the tomcat as well as in web sphere).

          The similar story holds for the AXIS2-4871 Jira.

          I'm attaching the patch. The patch resolves two Jirasm AXIS2- 4871 and AXIS2-4674 . please review and commit.

          Show
          Pradeep Fernando added a comment - Hi, I look in to the issue, and noticed that it is still there in the current trunk version. (reproduced it). According to my observations, the root cause of the issue being the appserver specific behaviours. In Tomcat, if the request URL is MyService?wsdl2 it gives the wsdl2 request parameter as a empty string, where as in web sphere it gives a null string. The obvious solutions, as of my understanding is the do a null check before further processing. i did that modification and now the the above issue no longer visible. (I verified in the tomcat as well as in web sphere). The similar story holds for the AXIS2-4871 Jira. I'm attaching the patch. The patch resolves two Jirasm AXIS2- 4871 and AXIS2-4674 . please review and commit.
          Hide
          Pradeep Fernando added a comment -

          The patch resolves the issues:

          AXIS2-4674
          AXIS2-4871

          review and commit.

          Show
          Pradeep Fernando added a comment - The patch resolves the issues: AXIS2-4674 AXIS2-4871 review and commit.
          Hide
          Andreas Veithen added a comment -

          Committed patch to the trunk (r1050836) and the 1.5 branch (r1050881).

          Show
          Andreas Veithen added a comment - Committed patch to the trunk (r1050836) and the 1.5 branch (r1050881).

            People

            • Assignee:
              Unassigned
              Reporter:
              Tony Lewis
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development