SOAP Methods

  The External SOAP Method product provides support for external SOAP
  methods, exposing them as callable objects within the Zope 
  environment.

  This is a blatant hack of ExternalMethod to not use a .py file but
  use the SOAPpy library instead.

  Due to their nature SOAP methods can take a long time to execute or
  not return at all if the remote server is unresponsive. Therefore an
  optimization technique available to you is to cache the results.
  We have made SOAPMethod cacheable with RAMCacheManager. Note that
  RAMCacheManager adds the AUTHENTICATED_USER as an extra key to the
  cache. Since AUTHENTICATED_USER is not used by SOAPMethod it is redundant.

Dependencies

  A module called SOAPpy, which can be downloaded
  from "Python Web Services":http://pywebsvcs.sourceforge.net/ SOAPMethod
  is tested with SOAPpy-0.10.1

  PyXML from "Sourceforge":http://pyxml.sourceforge.net/ SOAPMethod
  is tested with PyXML-0.8.2.

  Both these packages use python setup.py build/install.
  If you use the binary installation of Zope then just use the python
  executable that comes with Zope to put it in site-packages.

Example

  Id -- getQuote

  Endpoint Url -- http://services.xmethods.com/soap

  Method -- getQuote

  Namespace -- urn:xmethods-delayed-quotes

  Then call this from a DTML Method as &lt;dtml-var "getQuote(symbol='IBM')"&gt;

Interoperability

  SOAP is a relatively young standard. SOAPpy and some of the services
  are immature. During development we discovered for instance that the
  babelfish service returns strings in UTF-8 encoding. SOAPpy tries to
  convert the result to US-ASCII and will fail if there are characters
  with the 8th bit set. You therefore must manually change the encoding with

  &lt;dtml-var "babelfish(translationmode='en_fr',sourcedata=source).encode('latin-1')"&gt;

  We could have done this in SOAPMethod, but we don't know what character
  set you use in your webserver.

  Another interoperability issue is the support of certain popular but
  non-standard encodings of data structures. Data structures that are natural
  to use from Java, but SOAPpy simply doesn't support. E.g. the xsi:type is
  "ns2:Vector". The namespace is "http://xml.apache.org/xml-soap" and this is
  not in the SOAP 1.2 specifications.

References

  "XMethods":http://www.xmethods.com a registry of public SOAP methods

  "Java SOAP server using Apache BeanSerializer":http://aspn.activestate.com/ASPN/Mail/Message/Apache-Soap-Dev/1605095

  "SOAPBuilder's Interoperability Meeting":http://www.oreillynet.com/pub/wlg/2215

  "Apache SOAP type mapping":http://www-106.ibm.com/developerworks/webservices/library/ws-soapmap1/

Credits

  Georg Bauer from GWS wrote the first version of SOAPMethod in 2001.

