我是 grails 新手,尝试为我的 Web 服务构建后端,但应用程序仅访问提供的 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.
如何修复该错误?
最佳答案
缺少冒号? 8080之前
关于java - Grails + WS 客户端抛出 CXF 异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3715066/