Hello,

this is the first time I use this module. I do not understand how I can render / call an Wsclient operation in a template (node). Maybe I did not understand something. Thank you for your help, that is precious.

I have configured a soap web services (it's ok / green). In this Wsclient description I have several possible operations. Now, I want to call / render the operations in some different templates of nodes.

Can I do this with this module or code?
If yes, how should I proceed? I have tested the code in this post (https://www.drupal.org/node/1114320), but without success.
Can you tell me how to achieve this?

here is my code:

$service = wsclient_service_load('mywsclientdescription');
	
$account = new stdClass;
$account->name ='mylogin';
$account->pass_raw ='mypass';
			
// For own HTTPS certificates.
$curl_options[CURLOPT_SSL_VERIFYPEER] = FALSE;
// For own HTTP authorization.
$curl_options[CURLOPT_HTTPAUTH] = CURLAUTH_BASIC;
$curl_options[CURLOPT_USERPWD] = $account->name . ':' . $account->pass_raw;
$service->settings['curl options'] = $curl_options;
			
try {
	$result = $service->operations['myoperation'];
}

catch (WSClientException $e) {
	watchdog('wsclient', $e->__toString());
	return null;
}
		
return $result;

Thanks for your help. Thank you for your explanations to understand the good working of this module.

Comments

aj.sankar’s picture

Could you please elaborate more on account settings