Grails + WS Client抛出一个CXF异常

时间:2010-09-15 06:07:13

标签: java web-services grails grails-controller

我是grails的新手,并尝试为我的webservice构建后端,应用程序只访问提供的不能直接访问数据库的Web服务。

package backend

import org.grails.plugins.wsclient.service.WebService

class BackendController {

    WebService webService

    def index = { 
        def wsdlUrl = "http://localhost8080/BackendService/Backend?wsdl"
        def proxy = webService.getClient(wsdlUrl)

        def result = proxy.getAll()
        render(text:result);
    }
}

并抛出此错误

Error 500: Executing action [index] of controller [backend.BackendController] caused exception: org.apache.cxf.interceptor.Fault: None of the policy alternatives can be satisfied.

如何修复该错误?

1 个答案:

答案 0 :(得分:1)

错过了结肠?在8080之前