JBoss Community

Re: Disable wsdl publication

created by Martin Gustafsson in JBoss Web Development - View the full discussion

It's possible to use JBossWeb's RewriteValve to have JBossWeb intercept WSDL requests and return an HTTP 403 forbidden response before the request is passed on to JBossWS.

An example rewrite valve's rewrite pattern to disable access to "?wsdl" pages by providing a 403 forbidden access response:

 

<subsystem xmlns="urn:jboss:domain:web:1.2" default-virtual-server="default-host" native="false">
    <connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http"/>
    <virtual-server name="default-host" enable-welcome-root="true">
        <alias name="localhost"/>
        <alias name="example.com"/>
        <rewrite pattern="(.*)" substitution="-" flags="F">
             <condition test="%{QUERY_STRING}" pattern="wsdl" flags="OR"/>

        </rewrite>
    </virtual-server>
</subsystem>



Reply to this message by going to Community

Start a new discussion in JBoss Web Development at Community