首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >CxfClientGrailsPlugin -在设置clientInterface=[:]和serviceEndpointAddress之前,无法创建网站服务客户端abcClient

CxfClientGrailsPlugin -在设置clientInterface=[:]和serviceEndpointAddress之前,无法创建网站服务客户端abcClient
EN

Stack Overflow用户
提问于 2015-10-27 16:09:17
回答 1查看 333关注 0票数 1

我正在为SOAP请求使用cxf-client grails插件:我已经将这些客户端配置添加到Config中:

代码语言:javascript
复制
cxf {
  client {
    paymentRequestClient {
        wsdl = "https://sandbox.demo.com/payments.wsdl"
        namespace = "com.demo.soap"
        clientInterface = com.demo.soap.PaymentPortType
        serviceEndpointAddress = "https://sandbox.demo.com/payments.php"
    }

  }
}

在运行WSDL后,grails已经根据提供的grails wsdl2java生成了所需的Java类,但PaymentPortType类除外。

在运行应用程序时,我收到以下错误:

代码语言:javascript
复制
Web service client paymentRequestClient cannot be created before setting the clientInterface=[:] and serviceEndpointAddress=https://sandbox.demo.com/payments.php properties
[ERROR] 2015-10-27 12:00:11,899 CxfClientGrailsPlugin - Web service client paymentRequestClient cannot be created before setting the clientInterface=[:] and serviceEndpointAddress=https://sandbox.demo.com/payments.php properties
Configuring Spring Security Core ...
... finished configuring Spring Security Core
Configuring Spring Security REST ...
... finished configuring Spring Security REST
[ERROR] 2015-10-27 12:00:39,401      
org.codehaus.groovy.grails.web.context.GrailsContextLoaderListener -             Error initializing the application: Error creating bean with name 'paymentRequestClient': Initialization of bean failed; nested exception is org.springframework.beans.TypeMismatchException: Failed to convert property value of type 'java.lang.String' to required type 'java.lang.Class' for property 'clientInterface'; nested exception is java.lang.IllegalArgumentException: Could not load class []!

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'paymentRequestClient': Initialization of bean failed; nested exception is org.springframework.beans.TypeMismatchException: Failed to convert property value of type 'java.lang.String' to required type 'java.lang.Class' for property 'clientInterface'; nested exception is java.lang.IllegalArgumentException: Could not load class []!
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)

Caused by: org.springframework.beans.TypeMismatchException: Failed to convert property value of type 'java.lang.String' to required type 'java.lang.Class' for property 'clientInterface'; nested exception is java.lang.IllegalArgumentException: Could not load class []!
... 4 more

Caused by: java.lang.IllegalArgumentException: Could not load class []!
... 4 more

可能的问题是什么?

EN

回答 1

Stack Overflow用户

发布于 2015-11-30 18:52:43

之所以出现这个问题,是因为Spring找不到类com.demo.soap.PaymentPortType in the classpath

票数 -1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/33362699

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档