我在grails中成功創建了cxf wsdl web-services。現在我想配置cxf簡單的前端端點。在resources.groovy中使用DSL代替resource.xml配置CXF服務
我在grails項目的resource.xml文件中成功配置了cxf endpoint。
如..
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:simple="http://cxf.apache.org/simple"
xmlns:lang="http://www.springframework.org/schema/lang"
xmlns:jaxws="http://cxf.apache.org/jaxws"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang-2.0.xsd
http://cxf.apache.org/simple http://cxf.apache.org/schemas/simple.xsd
http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">
<import resource="classpath:META-INF/cxf/cxf.xml" />
<import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
<import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
<!--create CXF service-->
<simple:server serviceClass="com.j2.signup.FaxSignupService" address="/FaxSignupService">
</simple:server>
</beans>
但我想在resource.groovy DSL文件,而不是創造新的resource.xml相同CXF端點配置。
有人有想法嗎?
非常感謝伊恩,工作正常。感謝您在短時間內給予回覆。 –
你好伊恩,它工作正常。但是我得到了com.j2.signup.FaxSignupService中** def dataSource **的空值。我想使用grails dataSource服務從數據庫中獲取數據。你對此有任何想法? –
@ChiragDasani我已經添加了一些關於這種情況的更多細節。 –