You need to sign in to do that
Don't have an account?
Sureka
Web service callout failed: Unable to parse callout response. Apex type not found for element active error while reading Validation Rule
Hi All,
I am using the following code to read the details of 10 validation Rules. Following is the code:
MetadataService.MetadataPort service = createService();
List<MetadataService.ListMetadataQuery> queries = new List<MetadataService.ListMetadataQuery>();
MetadataService.ListMetadataQuery queryLayout = new MetadataService.ListMetadataQuery();
queryLayout.type_x = 'ValidationRule';
queries.add(queryLayout);
if(Limits.getHeapSize()<3000000)
{
MetadataService.FileProperties[] fileProperties = service.listMetadata(queries, 30);
List<String> fullNames = new List<String>();
if(fileProperties!=null)
{
for(MetadataService.FileProperties fileProperty : fileProperties)
{
if(fullNames.size()<10 && fileProperty.fullName!=null && fileProperty.ManageableState == 'unmanaged')
{
fullNames.add(fileProperty.fullName);
}
}
}
MetadataService.ReadResult resultValue = service.readMetadata('ValidationRule',fullNames); -- Error: Web service callout failed: Unable to parse callout response. Apex type not found for element active
Let me know what is wrong in the above call.
Thanks
I am using the following code to read the details of 10 validation Rules. Following is the code:
MetadataService.MetadataPort service = createService();
List<MetadataService.ListMetadataQuery> queries = new List<MetadataService.ListMetadataQuery>();
MetadataService.ListMetadataQuery queryLayout = new MetadataService.ListMetadataQuery();
queryLayout.type_x = 'ValidationRule';
queries.add(queryLayout);
if(Limits.getHeapSize()<3000000)
{
MetadataService.FileProperties[] fileProperties = service.listMetadata(queries, 30);
List<String> fullNames = new List<String>();
if(fileProperties!=null)
{
for(MetadataService.FileProperties fileProperty : fileProperties)
{
if(fullNames.size()<10 && fileProperty.fullName!=null && fileProperty.ManageableState == 'unmanaged')
{
fullNames.add(fileProperty.fullName);
}
}
}
MetadataService.ReadResult resultValue = service.readMetadata('ValidationRule',fullNames); -- Error: Web service callout failed: Unable to parse callout response. Apex type not found for element active
Let me know what is wrong in the above call.
Thanks
See some links below with the similar issue,
web service callout failed error
http://salesforce.stackexchange.com/questions/2146/web-service-callout-failed-error
use the SoapUI tool to test your web service for proper handling..
SoapUI is just a google search away.
it is not free, but there is a trial use period..
https://developer.salesforce.com/forums?id=906F00000008zrGIAQ
CalloutException: Web service callout failed: Unable to parse callout response. Apex type not found
https://developer.salesforce.com/forums?id=906F00000008ywGIAQ
Regards,
Ashish