Disable wadl Web Service Definition In CXF

谁都会走 提交于 2021-02-11 06:55:54

问题


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.

e.g. the url for wadl is - http://localhost:8080/webservice/rest?_wadl


回答1:


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>



回答2:


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



来源:https://stackoverflow.com/questions/31071576/disable-wadl-web-service-definition-in-cxf

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!