Ryan Bayne
asked on
SOAP Call __soapCall Causes Missing argument
Hello
Server logs are showing a "Missing argument" entry for every argument being passed to my SOAP call. The web service works just fine, not sure how to clear up these errors from my server log. I have attached some of the log file and here is my code which shows the call then function parameters...
Looked over PHP page many times and I can't see what I'm doing wrong. Can this actually be sorted so the errors are not generated?
http://php.net/manual/en/soapclient.soapcall.php
Thank you for any advice
Server logs are showing a "Missing argument" entry for every argument being passed to my SOAP call. The web service works just fine, not sure how to clear up these errors from my server log. I have attached some of the log file and here is my code which shows the call then function parameters...
$wtgapi_array = array();
$wtgapi_array['authmethod'] = 'email';// authorisation method key or email address (user selects on activation)
$wtgapi_array['key'] = '12345678';// @todo what if no API key what value do we pass?????
$wtgapi_array['title'] = 'Easy CSV Importer';
$wtgapi_array['id'] = '25';
$wtgapi_array['admin_email'] = get_option('admin_email');
$wtgapi_array['user_email'] = $current_user->user_email;
$wtgapi_array['server_name'] = $_SERVER['SERVER_NAME'];
$wtgapi_array['http_host'] = $_SERVER['HTTP_HOST'];
$wtgapi_array['pluginversion'] = $wtgpt_currentversion;
// @todo change authmethod value to be populated from option record set during activation
$result = $client->
__soapCall("wtgapi_downloads_get_latestversion",$wtgapi_array);
function wtgapi_downloads_get_latestversion($auth_method,$apikey,$title,$id,$admin_email_client,$user_email_client,$server_name,$http_host,$wtgpt_currentversion){
Looked over PHP page many times and I can't see what I'm doing wrong. Can this actually be sorted so the errors are not generated?
http://php.net/manual/en/soapclient.soapcall.php
Thank you for any advice
/home/sites/webtechglobal.co.uk/public_html/services/wtgapi_webservices_globalfunctions.php on line 113
[Sun Nov 06 17:58:23 2011] [error] [client 79.170.44.75] PHP Warning: Missing argument 1 for wtgapi_downloads_get_latestversion() in /home/sites/webtechglobal.co.uk/public_html/services/wtgdownloads.php on line 26
[Sun Nov 06 17:58:23 2011] [error] [client 79.170.44.75] PHP Warning: Missing argument 2 for wtgapi_downloads_get_latestversion() in /home/sites/webtechglobal.co.uk/public_html/services/wtgdownloads.php on line 26
[Sun Nov 06 17:58:23 2011] [error] [client 79.170.44.75] PHP Warning: Missing argument 3 for wtgapi_downloads_get_latestversion() in /home/sites/webtechglobal.co.uk/public_html/services/wtgdownloads.php on line 26
[Sun Nov 06 17:58:23 2011] [error] [client 79.170.44.75] PHP Warning: Missing argument 4 for wtgapi_downloads_get_latestversion() in /home/sites/webtechglobal.co.uk/public_html/services/wtgdownloads.php on line 26
[Sun Nov 06 17:58:23 2011] [error] [client 79.170.44.75] PHP Warning: Missing argument 5 for wtgapi_downloads_get_latestversion() in /home/sites/webtechglobal.co.uk/public_html/services/wtgdownloads.php on line 26
[Sun Nov 06 17:58:23 2011] [error] [client 79.170.44.75] PHP Warning: Missing argument 6 for wtgapi_downloads_get_latestversion() in /home/sites/webtechglobal.co.uk/public_html/services/wtgdownloads.php on line 26
[Sun Nov 06 17:58:23 2011] [error] [client 79.170.44.75] PHP Warning: Missing argument 7 for wtgapi_downloads_get_latestversion() in /home/sites/webtechglobal.co.uk/public_html/services/wtgdownloads.php on line 26
[Sun Nov 06 17:58:23 2011] [error] [client 79.170.44.75] PHP Warning: Missing argument 8 for wtgapi_downloads_get_latestversion() in /home/sites/webtechglobal.co.uk/public_html/services/wtgdownloads.php on line 26
[Sun Nov 06 17:58:23 2011] [error] [client 79.170.44.75] PHP Warning: Missing argument 9 for wtgapi_downloads_get_latestversion() in /home/sites/webtechglobal.co.uk/public_html/services/wtgdownloads.php on line 26
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Still not sure I'm getting it right. I'm doing what is shown on a tutorial, I'll go learn a bit more. This is what I have no but it has not made a difference.
// now connect too web service
$client = new SoapClient(null, array(
'location' => "http://www.webtechglobal.co.uk/services/wtgdownloads.php",
'uri' => "http://www.webtechglobal.co.uk/services/test/simple1_req/"));
$result = $client->wtgapi_downloads_get_latestversion("wtgapi_downloads_get_latestversion",$wtgapi_array);
if (is_soap_fault($result)) {
trigger_error("SOAP Fault: (faultcode: {$result->faultcode}, faultstring: {$result->faultstring})", E_USER_ERROR);
}
ASKER
Ah so the options are the like the URI etc.
OK I will try again.
OK I will try again.
ASKER
Open in new window