1 Reply Latest reply on May 28, 2013 6:00 AM by iaio81

    Performance Issues with ?wsdl

    spyhunter99

      Jboss 5.1.0GA, JbossWS native 3.4.0

      also present in Jboss 5.1.2 eap with JbossWS native 3.1.2sp13

       

      I've been noticing that each time something requests the wsdl from my web service endpoint, there is a huge spike in CPU usage on the server. Upon further investigation,  I checked out the class definition for the service

       

      @WebService(serviceName="service1", name="service1", targetNamespace="urn:service1")

      public class Service1Impl

      {

      //stuff

      }

       

      and then compared the wsdl presented by Jbossws with the one I had started with (top down) and they were different so I'm assuming that in this case, JbossWS generates a wsdl on the fly using reflection. The problem is that this is on every request. This probably should be cached somehow.

       

      Continuing the investigation, I tried adding the wsdlLocation parameter to the class and deployed.

       

      @WebService(serviceName="service1", name="service1", targetNamespace="urn:service1", wsdlLocation="WEB-INF/wsdl/my.wsdl")

      public class Service1Impl

      {

      //stuff

      }

       

       

      The ?wsdl url now returns the same wsdl that I had created from the top down approach, which is good, however I'm still getting a significant delay when loading the ?wsdl endpoint and high CPU usage when pressing refresh a bunch of times. I'm not sure what's happening, but there should be no to little delay for this after the first time the wsdl is presented. It seems clear that there is no caching mechanism.

       

      Question 1: how can I reduce the CPU usage and delay for returning the service?wsdl endpoint?

      Question 2: is there a way to disable the auto generation of ?wsdl url and replace it with something else?

      Question 3: is there any kind of cache mechanism that exists to resolve this?

      Question 4: does the cxf stack provide any way to resolve this?

       

      A few notes: all supporting files (i.e. imports) MUST be in WEB-INF/wsdl), if placed anywhere else, deployment tends to fail. My web service is actually a seperate jar bundled within a WAR file and thus the wsdl/xsd files must bein the WAR's WEB-INF/wsdl folder.