Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi, I am having a strange problem:
I have a SOAP service which has a method "delete".
Now everytime, I execute
$service = wsclient_service_load('producthandler');
try {
$result = $service->delete(array('tag' => $tag));
.....
the service itself is deleted. How can this be? How can I solve this problem?
Comments
Comment #1
vistree CreditAttribution: vistree commentedSorry for pushing, but is the deletion of the service itself (it is removed from the wsclinte UI) an expected behaviour? I can't find a "service->delete" or "this->delete" in the module code ....
Comment #2
georgir CreditAttribution: georgir commentedI'd say that it is expected behavior, because
$service
is an entity object:The
Entity
class is defined in the Entity API contrib module, if you are interested in the code.To call a service method with the name 'delete', you can use
invoke
:Comment #3
vistree CreditAttribution: vistree commentedHi georgir,
thank you for this!!!
Kind regards and a nice weekend
Comment #4
vistree CreditAttribution: vistree commentedAnd here a small update: I don't know why, but I had to use
$result = $service->invoke('delete', array('delete' =>array('tag' => $tag)))
So, I had to repeat delete as inner array!!
Comment #5
vistree CreditAttribution: vistree commented