Monday, January 17, 2011

Drupal SOAP with NuSOAP and this error message You must specify a name when you register an operation

While looking into Drupal and Soap I ran across this choice message

You must specify a name when you register an operation

I'm using:

Drupal 6.20
Services Module 6.x-2.4 - http://drupal.org/project/services -
Soap Server 6.x-1.2-beta1 - http://drupal.org/project/soap_server
w/ NuSOAP 0.9.5.zip -   http://sourceforge.net/projects/nusoap

The Soap Server 6.x-3x-dev has a warning: Prototype in active development - not ready for production use without careful scrutiny and testing, so I went with this older soap module dated from back in 2008. This older version uses nusoap, and is likely a lot slower than the standard php soap functions introduced in 5.x

After receiving the above message, I also ran across this patch http://drupal.org/files/issues/soap_server.patch and ran it against soap_server/soap_server.module. Seems like the soap module has already been patched to the most recent one.


Solution:
In the file drupal module - soap_server.module do a find and replace for
'# 
ie single quote, pound character, and replace it with just a
'
single quote.

The soap wsdl can then be retrieved.