Eventually a duplicate to Integration of Java application with OpenCms, however the question there is the other way around, how to integrate Spring into OpenCms.
Yes, you can implement web services within OpenCms, you can basically do anything within OpenCms that you can do with Java, JSP, Servlet technologies. You can deploy your own custom jars, taglibs, implement RESTful services, etc.
I think it would be good to explicitly know your difficulties or question in the very detail.
I mean, if you just want OpenCms to act as a web services back end, then it's not 'real' integration, then it's pretty much loosely coupled. Then, you just handle OpenCms as any other web services backend, not much difference. And this way would be pretty easy in terms of 'integration'.
Then, you would let OpenCms return json or xml, instead of html, by creating the templates and assigning them to your resources (i.e. structured content in OpenCms, using cms:contentload tag, but outputting json). That's "basically it". Therefore, not clear where exactly you're currently struggling within OpenCms, please let me know some more details and the current status of your OpenCms setup, experience, etc.