Until now I’m calling a web service with using specific function like hook_user_logout, _validate, _submit…, but now I need to create a page that will display details that I’ll receive results from the web service, but I don’t know how to call when I enter lets say user/%/reports.
Also on that page there will be a link that will display more details that will come from the webservice.
Is there a function for page load, url open or something similar in Drupal 7?
Here’s my part of the code when a user logouts.
<?php
function mymodyle_user_logout($account) {
global $user;
$username = $user -> name;
$ip_address = $_SERVER["REMOTE_ADDR"];
$session_id = session_id();
$xml_string = '<some_method>
<username>' . $username . '</username>
<ip_address>' . $ip_address . '</ip_address>
<session_id>' . $session_id . '</session_id>
<language>en</language>
</some_method>';
$client = new nusoap_client('http://10.10.60.80:8090/CardHolderAuthentication.asmx?wsdl', array('soap_version' => SOAP_1_1, 'trace' => 1, 'exeptions' => true));
$client -> soap_defencoding = 'UTF-8';
$client -> decode_utf8 = FALSE;
$result = $client -> call('Logout', array('_xml' => $xml_string));
//$response = simplexml_load_string($result['LogoutResult']);
//$status = $response -> error->descr_bg;
}