Building a web service layer into Plone3
kevin at bud.ca
Wed Oct 31 01:38:46 UTC 2007
If you just need to respond to a limited number of custom SOAP
messages, then making a tool and installing it into the root of your
Plone instance is one solution. For example, something along these
lines (semi-pseudo semi-crusty code follows) ...
class MyCustomTool(UniqueObject, SimpleItem, PropertyManager):
"Custom Web Service tool"
security = ClassSecurityInfo()
id = meta_type = 'portal_custom_tool'
title = 'Custom Web Service Tool'
plone_tool = True
def specialWebServiceMethod(self, param1, param2 ):
# do stuff ...
Then you need to instantiate this tool inside your Plone site so that
it has access to acquisition and context and all that jazz.
I've used this with XML-RPC, since Zope 2 will respond to XML-RPC
messages out-of-the-box. Adding in SOAP support I've never
experimented with, Google or others on this list might be able to
provide more knowledge there ...
More information about the Product-Developers