简体   繁体   中英

Disable wadl Web Service Definition In CXF

I am using CXF webservice and everything is working perfectly. But as I am going to expose our webservice to public the wadl url is working from public. Anyone can see the wadl definition of our webservice.

How can we disable this definition.

eg the url for wadl is - http://localhost:8080/webservice/rest?_wadl

wadl is generated thanks to the following dependency.

cxf-rt-rs-service-description

if you remove that jar from the application/dependency management no wadl will be generated.

Additional information:

http://cxf.apache.org/docs/jaxrs-services-description.html#JAXRSServicesDescription-WADLAutoGenerationatRuntime

Try adding this to jaxrs:server , this will hide the endpoint exposed by the jaxrs:server address

<jaxrs:properties>
   <entry key="org.apache.cxf.endpoint.private" value="true"/>
 </jaxrs:properties>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM