简体   繁体   English

在CXF中禁用wadl Web服务定义

[英]Disable wadl Web Service Definition In CXF

I am using CXF webservice and everything is working perfectly. 我正在使用CXF Web服务,并且一切正常。 But as I am going to expose our webservice to public the wadl url is working from public. 但是,当我要向公众公开我们的Web服务时,wadl网址正在从公共工作。 Anyone can see the wadl definition of our webservice. 任何人都可以看到我们的Web服务的wadl定义。

How can we disable this definition. 我们如何禁用此定义。

eg the url for wadl is - http://localhost:8080/webservice/rest?_wadl 例如,wadl的网址是-http:// localhost:8080 / webservice / rest?_wadl

wadl is generated thanks to the following dependency. 由于以下依赖性,生成了wadl。

cxf-rt-rs-service-description CXF-RT-RS-服务描述

if you remove that jar from the application/dependency management no wadl will be generated. 如果从应用程序/依赖性管理中删除该jar,则不会生成wadl。

Additional information: 附加信息:

http://cxf.apache.org/docs/jaxrs-services-description.html#JAXRSServicesDescription-WADLAutoGenerationatRuntime 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:server ,这将隐藏jaxrs:server地址公开的端点

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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