Using Grails and CXF, I have published a small web service that looks like this
class TestService {
static expose=['cxf']
int pushData(int id, DataHandler data) {
//receives data for a specific ID,
return 1
}
}
The thing is that I now would like to enable MTOM for the transfer of the DataHandler-data. Normally with Groovy and CXF (or JAX-WS) I’d publish TestService as an Endpoint
Endpoint ep = Endpoint.publish("http://localhost:9000/test", new TestService())
SOAPBinding binding = (SOAPBinding)ep.getBinding();
binding.setMTOMEnabled(true);
And all’s done.
Now that I use Grails to do my publishing I can’t figure out how to get the Endpoint. Does anyone know how this could be accomplished?
Let’s assume that the service interface looks like this
The attributes of the endpoint can be specified in the cxf-servlet.xml . With an implementing service called ServiceImpl, you need to add the following specifications