Comments

doobs’s picture

There's not much documentation for the Drupal soap_server module so as a rank newbie this wasn't particularly obvious. Anyway ...

To endow your new "whatever" module with a SOAP Web Services interface, you need to:

  1. install services module in sites/all/modules/ dir
  2. install soap_server in sites/all/modules/ dir
  3. install nuSoap php package in sites/all/modules/soap_server
  4. in administer->site-building->modules interface enable Services module
  5. likewise enable Services Key Authentication
  6. enable Services System Service
  7. enable Services User Service
  8. enable SOAP Server
  9. Save config
  10. navigate to administer->site-building -> Services->settings
  11. select Key authentication (otherwise you only get boolean:true SOAP responses)
  12. disable "Use keys"
  13. disable "Use sessid"
  14. save settings

At this point, you can implement hook_service() in your module - as in e.g. the "Echo service" example above. Then:

  1. Navigate to administer->Site building-> Services and select system.cacheClearAll
  2. Call method (this rebuilds the list of services IIUC).
  3. Navigate to administer->Site building-> Services and select SOAP - /services/soap to see a beautified represention of the Web Service interfaces
  4. Navigate (manually) to the url http://your.host/?q=services/soap/wsdl to obtain the WSDL description
  5. http://your.host/?q=services/soap is your WS endpoint address
  6. build a client
  7. get upset when your auto generated service function calls have embedded "." in the function names
  8. ...
  9. profit!

Probably this info should go some place else, but I don't know where.
Thanks to Ilo for pointing this out to me.