如何更改cxf端点的wsdl url?

时间:2014-11-27 11:12:17

标签: web-services soap wsdl cxf apache-camel

我正在尝试使用apache camel通过camel配置文件创建代理服务。

我已成功为轴2的版本Web服务创建代理服务。

唯一的问题是,代理服务最终wsdl url和地址都指向同一个网址。

这是我的camel-config.xml文件部分:

<cxf:cxfEndpoint id="securityService"
                   address="https://0.0.0.0:9080/services/version.SecurityHttpsSoap11Endpoint"
                   endpointName="s:version.SecurityHttpsSoap11Endpoint"                
                   serviceName="s:version"
                   wsdlURL="etc/version.wsdl"
                   xmlns:s="http://axisversion.sample"/>

现在唯一的问题是来自上面的配置,如果我必须看到上述服务的wsdl。 我的wldl网址将是:

https://0.0.0.0:9080/services/version.SecurityHttpsSoap11Endpoint?wsdl

肥皂地址位置为:

soap:address location="https://0.0.0.0:9080/services/version.SecurityHttpsSoap11Endpoint"

现在我想要的是wsdl url应该与soap地址位置不同,即

wsdl网址应为:

https://0.0.0.0:9080/services/version.Security?wsdl

并且肥皂地址位置应该是:

soap:address location="https://0.0.0.0:9080/services/version.SecurityHttpsSoap11Endpoint"

我怎样才能做到。 提前谢谢。

1 个答案:

答案 0 :(得分:2)

您可以通过添加属性设置来定义CxfEndpoint,就像

一样
<cxf:cxfEndpoint id="securityService"
                   address="https://0.0.0.0:9080/services/version.SecurityHttpsSoap11Endpoint"
                   endpointName="s:version.SecurityHttpsSoap11Endpoint"                
                   serviceName="s:version"
                   wsdlURL="etc/version.wsdl"
                   xmlns:s="http://axisversion.sample">
   <cxf:properties>
        <entry key="publishedEndpointUrl" value="http://www.simple.com/services/test" />
   </cxf:properties>

   </cxf:cxfEndpoint>
</cxf:cxfEndpoint>
相关问题