从 grails 请求 wsdl 文件时出错
我正在使用: 圣杯 xfire插件 我创建了包含以下代码的移动服务: services/MobileService.groovy
package survey
class MobileService {
static expose=['xfire'];
static transactional = true;
Choice getChoices(String questionTitle_){
return Questions.findByQuestionTitle(questionTitle_);
}
}
UrlMappings.groovy
class UrlMappings {
static mappings = {
"/$controller/$action?/$id?"{
constraints {
controller(matches:/.*[^(services)].*/)
}
}
"/"(view:"/index")
"500"(view:'/error')
}
}
我可以在此处看到 WSDL 文件的 XML 内容: http://127.0.0.1:8080/survey/services/mobile?wsdl 但我无法使用我的客户端读取它,并且出现以下错误:
错误 2012-01-25 22:42:12,826 ["http-bio-8080"-exec-2] 错误 [/survey].[XFireServlet] - servlet 的 Servlet.service() [XFireServlet] 在路径 [/survey] 的上下文中抛出异常消息: 键没有值 [org.hibernate.impl.SessionFactoryImpl@4af6178d] 绑定到线程 ["http-bio-8080"-exec-2] 行 |方法 ->> 886| java.util.concurrent.ThreadPoolExecutor$Worker 中的 runTask - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | 908 | 908运行于 '' ^ 680 |跑步 。 。在java.lang.Thread中
更改客户端后,事实证明 SOAP 服务器和客户端现在工作正常。 该错误没有影响服务器。
I'm using:
Grails
xfire plugin
and I created the service mobile containing the following code:
services/MobileService.groovy
package survey
class MobileService {
static expose=['xfire'];
static transactional = true;
Choice getChoices(String questionTitle_){
return Questions.findByQuestionTitle(questionTitle_);
}
}
UrlMappings.groovy
class UrlMappings {
static mappings = {
"/$controller/$action?/$id?"{
constraints {
controller(matches:/.*[^(services)].*/)
}
}
"/"(view:"/index")
"500"(view:'/error')
}
}
I can see XML content of WSDL file here:
http://127.0.0.1:8080/survey/services/mobile?wsdl
But I can't read it using my client and I'm having the following error:
Error 2012-01-25 22:42:12,826 ["http-bio-8080"-exec-2] ERROR
[/survey].[XFireServlet] - Servlet.service() for servlet
[XFireServlet] in context with path [/survey] threw exception Message:
No value for key [org.hibernate.impl.SessionFactoryImpl@4af6178d]
bound to thread ["http-bio-8080"-exec-2] Line | Method
->> 886 | runTask in java.util.concurrent.ThreadPoolExecutor$Worker
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | 908 | run in '' ^ 680 | run . . in java.lang.Thread
After changing the client it turned out that the SOAP server and client is working fine now.
That error wasn't effecting the server.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
问题和解决方案在 这个 jira
对我有用的黑客:
Problem and solution are described in this jira
Hack that works for me: