1

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

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"
    }

  }
}

在运行grails wsdl2javagrails 之后,除了 class.xml 之外,grails 已经针对提供的 WSDL 生成了所需的 JavaPaymentPortType类。

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

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

可能的问题是什么?

4

1 回答 1

-1

你有这个问题是因为 Spring 找不到类com.demo.soap.PaymentPortType in the classpath

于 2015-11-30T10:52:42.737 回答