<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">

<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>

                                <td>

                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="https://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>

                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px;  -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
    Performance Issues with ?wsdl
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="https://community.jboss.org/people/spyhunter99">spyhunter99</a> in <i>JBoss Web Services</i> - <a href="https://community.jboss.org/message/758131#758131">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p>Jboss 5.1.0GA, JbossWS native 3.4.0</p><p>also present in Jboss 5.1.2 eap with JbossWS native 3.1.2sp13</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>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,&#160; I checked out the class definition for the service</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>@WebService(serviceName="service1", name="service1", targetNamespace="urn:service1")</p><p>public class Service1Impl </p><p>{</p><p>//stuff</p><p>}</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>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.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Continuing the investigation, I tried adding the wsdlLocation parameter to the class and deployed.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>@WebService(serviceName="service1", name="service1", targetNamespace="urn:service1", wsdlLocation="WEB-INF/wsdl/my.wsdl")</p><p>public class Service1Impl </p><p>{</p><p>//stuff</p><p>}</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>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.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Question 1: how can I reduce the CPU usage and delay for returning the service?wsdl endpoint?</p><p>Question 2: is there a way to disable the auto generation of ?wsdl url and replace it with something else?</p><p>Question 3: is there any kind of cache mechanism that exists to resolve this?</p><p>Question 4: does the cxf stack provide any way to resolve this?</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>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.</p></div>

<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style="margin: 0;">Reply to this message by <a href="https://community.jboss.org/message/758131#758131">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in JBoss Web Services at <a href="https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


                </td>
            </tr>
        </tbody>
    </table>

</div>

</body>
</html>