You need to sign in to do that
Don't have an account?
Varun Sinha 17
Apex type not found for element
I was able to make a connection with the endpoint url.But now when I am trying to call method to create diagnostic key I am getting this error :
System.CalloutException: Web service callout failed: Unable to parse callout response. Apex type not found for element diagnosticSessionStatus.
Can anyone help me with this?
Thanx
System.CalloutException: Web service callout failed: Unable to parse callout response. Apex type not found for element diagnosticSessionStatus.
Can anyone help me with this?
Thanx
It's sounds like that there will be some problem with WSDL, can you please share complete log
--
Thanks,
Swayam
@salesforceguy
swayamsfdc@gmail.com
--
Thanks,
Swayam
@salesforceguy
--
Thanks
Swayam
@salesforceguy
I have mailed you the debug log.
I got the same while working on API Call, you can try this :--
To fix the error : "System.CalloutException: Web service callout failed: Unable to parse callout response. Apex type not found for element (name_of_xml_element for this example it is CustomerData)" try following.
You must have the public class defined for that element.(public class CustomerData).
You must call it from the *result class:
public class GetCustomerDataByAuthorSResult {
public clsCustomerService.CustomerData CustomerData;
Finally, when trying to execute Anonymous code, check if there is this in the CALLOUT_RESPONSE
<CustomerData xmlns="">
(As far as I understood, this means that the element is not qualified and has to be defined as such -
SOLUTION: Change red marked true to false!
(Complete class of undefined element):
public class GetCustomerDataByAuthorSResult {
public clsCustomerService.CustomerData CustomerData;
private String[] CustomerData_type_info = new String[]{'CustomerData',
'some external service'
'CustomerData',
'1','1','false'};
private String[] apex_schema_type_info = new String[]{'some external service'
'true','false'};
private String[] field_order_type_info = new String[]{'CustomerData'};
public class diagnosticSessionStatus {
public DateTime creationDate;
public String diagnosticSessionStatus;
public String id;
public DateTime lastUpdateDate;
public wwwKaidaraComKaidaraservice.dsOwner owner;
public String title;
private String[] creationDate_type_info = new String[]{'creationDate','http://www.kaidara.com/KaidaraService',null,'0','1','false'};
private String[] diagnosticSessionStatus_type_info = new String[]{'diagnosticSessionStatus','http://www.kaidara.com/KaidaraService',null,'1','1','false'};
private String[] id_type_info = new String[]{'id','http://www.kaidara.com/KaidaraService',null,'0','1','false'};
private String[] lastUpdateDate_type_info = new String[]{'lastUpdateDate','http://www.kaidara.com/KaidaraService',null,'0','1','false'};
private String[] owner_type_info = new String[]{'owner','http://www.kaidara.com/KaidaraService',null,'0','1','false'};
private String[] title_type_info = new String[]{'title','http://www.kaidara.com/KaidaraService',null,'0','1','false'};
private String[] apex_schema_type_info = new String[]{'http://www.kaidara.com/KaidaraService','true','false'};
private String[] field_order_type_info = new String[]{'creationDate','diagnosticSessionStatus','id','lastUpdateDate','owner','title'};
}
But still I am getting error.