Grails + WS 客户端抛出 CXF 异常
我是 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.
如何修复该错误?
I'm new in grails, and trying to build a backend for my webservice, the apps only access the webservice provided not access to databases directly.
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);
}
}
and throw this error
Error 500: Executing action [index] of controller [backend.BackendController] caused exception: org.apache.cxf.interceptor.Fault: None of the policy alternatives can be satisfied.
How to fix that error ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
缺少冒号? 8080之前
missing the colon? before the 8080