SOAP-ERROR: Encoding: object has no 'activeCharts' propertyLast response
Answered
Hi,
I could not get Report Service request for "FILTEROPTIONS" from SOAP client. I am using PHP SOAP client.
Here is my example code
<?php ini_set('soap.wsdl_cache_enabled', 0); ini_set('soap.wsdl_cache_ttl', 900); ini_set('default_socket_timeout', 15); $wsdl_reporturl = 'http://example.com/services/ReportService?wsdl'; $report = new SoapClient($wsdl_reporturl); $webserviceAdmin = 'sam@example.com'; $webserviceAdminPassword = 'Test@123'; //report service call function showReport() { $ReportServiceRequest['loginId'] = $GLOBALS['webserviceAdmin']; $ReportServiceRequest['password'] = $GLOBALS['webserviceAdminPassword']; $ReportServiceRequest['orgId'] = 1; $ReportServiceRequest['reportRequest'] = "FILTEROPTIONS"; $ReportServiceRequest['reportId'] = "72136"; $ReportServiceRequest['objectName'] = "72202"; $response = doWebserviceReportCall($ReportServiceRequest); if ($response != null and strcmp($response->statusCode, 'SUCCESS') == 0) return true; return false; } function doWebserviceReportCall($rsr) { try { $rs = $GLOBALS['report']->remoteReportCall($rsr); } catch (Exception $e) { echo "Error! "; echo $e->getMessage(); echo 'Last response: ' . $GLOBALS['report']->__getLastResponse(); return null; } return $rs; } showReport();
Can some one help me what am i missing in this code?
Thanks in advance.
Sam
Hi Sam,
thanks for sending across the PHP. I noticed that in the WSDL the "activeCharts" element is not the first element listed, the first one is actually "absoluteTableWidth"
So then I was wondering why you were getting the error about the missing "activeCharts" property and not the "absoluteTableWidth" property (because you don't have that in your request either), and then I realised that it was because "activeCharts" doesn't have the constraint "nillable=true"
In other words, it looks to me like you've left out all of the ReportServiceRequest's mandatory fields.
Please add them in and let me know if it resolves the error.
regards,
David
Hi Sam,
thanks for sending across the PHP. I noticed that in the WSDL the "activeCharts" element is not the first element listed, the first one is actually "absoluteTableWidth"
So then I was wondering why you were getting the error about the missing "activeCharts" property and not the "absoluteTableWidth" property (because you don't have that in your request either), and then I realised that it was because "activeCharts" doesn't have the constraint "nillable=true"
In other words, it looks to me like you've left out all of the ReportServiceRequest's mandatory fields.
Please add them in and let me know if it resolves the error.
regards,
David
Replies have been locked on this page!