## 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:

- XFire plugin which uses the XFire SOAP stack
- 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 `exposes` static property. The below example is taken from the XFire plugin:

    class BookService {  static expose=['xfire']  Book[] getBooks(){
        Book.list() as Book[]
      }
    }

The WSDL can then be accessed at the location: `http://127.0.0.1:8080/your_grails_app/services/book?wsdl`

For more information on the XFire plug-in refer the documentation on the wiki.