CxfClientGrailsPlugin - Невозможно создать abcClient клиента веб-службы до установки clientInterface=[:] и serviceEndpointAddress.
Я использую плагин Grails cxf-client для запроса SOAP: я добавил эти настройки клиента в 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 wsdl2java
Grails сгенерировал необходимые классы Java на основе предоставленного WSDL, за исключением PaymentPortType
учебный класс.
При запуске приложения я получаю эту ошибку:
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
В чем может быть возможная проблема?
1 ответ
У вас есть эта проблема, потому что Spring не может найти класс com.demo.soap.PaymentPortType in the classpath