Last updated March 11, 2009. Created by snelson on January 29, 2007.
Edited by electricPineapple. Log in to edit this page.
This section is for developers interested in creating service or server modules to extend the capabilities of Services.
Api keys to the city (setting up a Flex 3 project with Drupal Services)
Comments
SOAP server module
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:
At this point, you can implement hook_service() in your module - as in e.g. the "Echo service" example above. Then:
Probably this info should go some place else, but I don't know where.
Thanks to Ilo for pointing this out to me.
confirmation on this instruction please
3. install nuSoap php package in sites/all/modules/soap_server
Is this where the nuSoap php package is suppose to go for certain?
just a thought on next version of services. Why not put the package in /sites/libraries/services/soap_server next time.
Odd, but it happened to me...
Thank you for this. just wanted to add that when I tried to follow this, I found out that my services/services.module had this line in services_get_all() function:
services_strip_hashes()
this means, of course that the hashes are removed from array keys. however, my soap_server.module is still using hashes, like: $method['#method'].
this results in the NUSOAP.php to fail with this message:
You must specify a name when registering an operation
since $method['#method'] is null. once I edited the soap_server.module file and removed the incorrect hashes, it worked.
Cheers,
Rex
Confirmed
Once I removed the # signs from the soap_server.module I stopped receiving this error.
Another thing:
array(
'#method' => 'price.echo',
'#callback' => 'price_echo',
//'#auth' => false,
'#return' => 'struct',
'#args' => array(
array(
'#name' => 'message',
'#type' => 'string',
'#description' => t('The message to return.'),
)),
'#help' => t('Returns an object containing a sessid and user.')
)
I can't seem to get more than one argument in the array.
I've tried the following:
'#args' => array(
array(
'#name' => 'message',
'#type' => 'string',
'#description' => t('The message to return.'),
),
array(
'#name' => 'message1',
'#type' => 'string',
'#description' => t('The message to return.'),
)
),
I only get a "Access denied". I've cleared the cache but nothing helps? Can this be true?
http://la.rshansen.dk
This may help:
This may help: http://drupal.org/node/800590