【问题标题】:Using cxf client and server plugin at the same time for grails同时为grails使用cxf客户端和服务器插件
【发布时间】:2016-11-28 23:06:19
【问题描述】:

我目前正在尝试在 grails 中设置 cxf soap 服务器和 cxf soap 客户端插件。

单独使用效果很好,但我无法同时将它们设置在一起。我收到“未找到任何服务”。当我尝试访问我的 wsdl 端点时出错。我的理论是客户端插件配置覆盖了影响服务器插件的东西。

Config.groovy的sn-p:

//cxf server plugin config
cxf.endpoint.soap12Binding = true
cxf.servlets = [CxfServlet: '/fax/api/*']

//cxf client plugin config
cxf {
    client {
        faxApiClient {
            //used for invoking service
            clientInterface = com.synacy.whitelabel.client.fax.Api
            serviceEndpointAddress = "http://192.168.1.99:8000/fax/soap/v2.2"
        }
    }
}

有没有办法解决这个问题?

【问题讨论】:

    标签: grails cxf


    【解决方案1】:

    将服务器配置与客户端设置一起放入块中:

    cxf {
        endpoint {
            soap12Binding = true
        }
        servlets = [CxfServlet: '/fax/api/*']
    
        client {
            faxApiClient {
                //used for invoking service
                clientInterface = com.synacy.whitelabel.client.fax.Api
                serviceEndpointAddress = "http://192.168.1.99:8000/fax/soap/v2.2"
            }
        }
    }
    

    【讨论】:

    • 我已经编辑了这个问题,我也试过了,但我仍然收到错误。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-09-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多