【问题标题】:jax-ws binding - method is not renamed, while classes arejax-ws 绑定 - 方法没有重命名,而类是
【发布时间】:2012-05-12 11:55:36
【问题描述】:

我觉得我被困住了。

这里是wsdl: http://www.doffin.no/ws/tdeservice.asmx?wsdl

我使用 apache maven cxf 插件生成类。由于具有序列“X0020”的名称,我有两个要重命名的类。

  • 为 wsdl:definitions/wsdl:service[@name='TDE_x0020_Connect'] 生成一个;

  • 另一个用于 wsdl:definitions/wsdl:portType[@name='TDE_x0020_ConnectSoap']。

我还希望将返回第二个类的第一个类的 getter 方法重命名。我尝试使用绑定文件:

<jaxws:bindings
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
    wsdlLocation="TdeService.wsdl"
    xmlns:jaxws="http://java.sun.com/xml/ns/jaxws">
    <jaxws:bindings node="wsdl:definitions/wsdl:service[@name='TDE_x0020_Connect']">
        <jaxws:class name="TdeConnect"/>
    </jaxws:bindings>
    <jaxws:bindings node="wsdl:definitions/wsdl:portType[@name='TDE_x0020_ConnectSoap']">
        <jaxws:class name="TdeConnectSoap"/>
    </jaxws:bindings>
    <jaxws:bindings node="wsdl:definitions/wsdl:service[@name='TDE_x0020_Connect']/wsdl:port[@name='TDE_x0020_ConnectSoap']">
        <jaxws:method name="getTdeConnectSoap"/>
    </jaxws:bindings>
</jaxws:bindings>

但是,类被重命名,而方法则不是:

@WebEndpoint(name = "TDE_x0020_ConnectSoap")
public TdeConnectSoap getTDEX0020ConnectSoap() {
    return super.getPort(TDEX0020ConnectSoap, TdeConnectSoap.class);
}
@WebEndpoint(name = "TDE_x0020_ConnectSoap")
public TdeConnectSoap getTDEX0020ConnectSoap(WebServiceFeature... features) {
    return super.getPort(TDEX0020ConnectSoap, TdeConnectSoap.class, features);
}

我觉得我做错了什么,您能否提供有关该问题的提示或综合手册的链接?

【问题讨论】:

    标签: java web-services


    【解决方案1】:

    我有同样的问题,所以我向 CXF 团队提交了一个错误(问题CXF-5783)。

    现在问题已解决,您可以使用Apache snapshot repository 进行检查。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-04-24
      • 1970-01-01
      • 2012-09-08
      • 2011-10-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多