我使用WSDL文件: Grails的 XFire軟件插件 ,我創建了一個包含下面的代碼服務的移動: 服務/ MobileService.groovy有錯誤,同時要求從Grails的
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:12826【 「HTTP-BIO-8080」 - exec-2]錯誤 [/survey].[XFireServlet] - servlet的Servlet.service() [XFireServlet]在路徑[/ survey]的上下文中拋出異常消息: key [org.hibernate.impl。 SessionFactoryImpl @ 4af6178d] 綁定到線程[「http-bio-8080」-exec-2]行|方法 - >> 886 | runTask in java.util.concurrent.ThreadPoolExecutor $ Worker - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 908 |在''^ 680 |中運行跑 。 。 in java.lang.Thread
更改客戶端後,事實證明SOAP服務器和客戶端現在工作正常。 該錯誤不影響服務器。