13.2 SOAP - Reference Documentation
Authors: Graeme Rocher, Peter Ledbrook, Marc Palmer, Jeff Brown, Luke Daley, Burt Beckwith
Version: null
13.2 SOAP
There are several plugins that add SOAP support to Grails depending on your preferred approach. For Contract First SOAP services there is a Spring WS plugin, whilst if you want to generate a SOAP API from Grails services there are several plugins that do this including:
ยังมีปลั๊กอินอีกหลากหลายที่เพิ่มความสามารถในการสนัสนุน SOAP ให้กับ Grails สำหรับผู้ที่อยากจะเริ่มต้น อาจจะเริ่มโดยใช้ปลั๊กอินที่ชื่อว่า Spring WS plugin ในขณะเดียวกันถ้าคุณต้องการจะสร้าง SOAP API จาก Grails services ก็สามารถทำได้โดยปลั๊กอินดังต่อไปนี้
- CXF plugin which uses the CXF SOAP stack
- Axis2 plugin which uses Axis2
- Metro plugin which uses the Metro framework (and can also be used for Contract First)
Most of the SOAP integrations integrate with Grails services via the
การใช้ SOAP กับ Grails นั่นโดยส่วนมากจะใช่ร่วมกับ Grails services via the exposes static property. This example is taken from the CXF plugin:
exposes static property โดยนี้เป็นตัวอย่างที่ดึงมากจาก CXF plugin:class BookService { static expose = ['cxf'] Book[] getBooks() {
Book.list() as Book[]
}
}
The WSDL can then be accessed at the location:
โดยหลังจากที่รันแล้ว ตัว WSDL จะเข้าถึงได้จาก http://127.0.0.1:8080/your_grails_app/services/book?wsdl
http://127.0.0.1:8080/your_grails_app/services/book?wsdl
For more information on the CXF plugin refer to the documentation on the wiki.
สำหรับข้อมูลเพิ่มเติมของ CXF Plugin ก็สามารถดูได้จาก the documentation

