You need to sign in to do that
Don't have an account?
Nerijus
System.CalloutException: Web service callout failed: Unable to parse callout response. Apex type not found for element id
I'm trying to call Google AdManager from Salesforce over SOAP and when I do a callout to one of the methods I get this "System.CalloutException: Web service callout failed: Unable to parse callout response. Apex type not found for element id".
Was trying to "google" the error but I can't seem to find a solution for this, maybe someone can help me out here?
Calling this getCurrentUser() method:
Was trying to "google" the error but I can't seem to find a solution for this, maybe someone can help me out here?
Calling this getCurrentUser() method:
public class UserServiceInterfacePort { public String endpoint_x = 'callout:AdManager/v201911/UserService'; public Map<String,String> inputHttpHeaders_x; public Map<String,String> outputHttpHeaders_x; public String clientCertName_x; public String clientCert_x; public String clientCertPasswd_x; public Integer timeout_x; public UserService.SoapRequestHeader RequestHeader; public UserService.SoapResponseHeader ResponseHeader; private String RequestHeader_hns = 'RequestHeader=https://www.google.com/apis/ads/publisher/v201911'; private String ResponseHeader_hns = 'ResponseHeader=https://www.google.com/apis/ads/publisher/v201911'; private String[] ns_map_type_info = new String[]{'https://www.google.com/apis/ads/publisher/v201911', 'UserService'}; public UserService.User_x getCurrentUser() { UserService.getCurrentUser_element request_x = new UserService.getCurrentUser_element(); UserService.getCurrentUserResponse_element response_x; Map<String, UserService.getCurrentUserResponse_element> response_map_x = new Map<String, UserService.getCurrentUserResponse_element>(); response_map_x.put('response_x', response_x); WebServiceCallout.invoke( this, request_x, response_map_x, new String[]{endpoint_x, '', 'https://www.google.com/apis/ads/publisher/v201911', 'getCurrentUser', 'https://www.google.com/apis/ads/publisher/v201911', 'getCurrentUserResponse', 'UserService.getCurrentUserResponse_element'} ); response_x = response_map_x.get('response_x'); return response_x.rval; }Expecting back this class:
public class User_x { public Boolean isActive; public Boolean isEmailNotificationAllowed; public String externalId; public Boolean isServiceAccount; public String ordersUiLocalTimeZoneId; private String[] isActive_type_info = new String[]{'isActive','https://www.google.com/apis/ads/publisher/v201911',null,'0','1','false'}; private String[] isEmailNotificationAllowed_type_info = new String[]{'isEmailNotificationAllowed','https://www.google.com/apis/ads/publisher/v201911',null,'0','1','false'}; private String[] externalId_type_info = new String[]{'externalId','https://www.google.com/apis/ads/publisher/v201911',null,'0','1','false'}; private String[] isServiceAccount_type_info = new String[]{'isServiceAccount','https://www.google.com/apis/ads/publisher/v201911',null,'0','1','false'}; private String[] ordersUiLocalTimeZoneId_type_info = new String[]{'ordersUiLocalTimeZoneId','https://www.google.com/apis/ads/publisher/v201911',null,'0','1','false'}; private String[] apex_schema_type_info = new String[]{'https://www.google.com/apis/ads/publisher/v201911','true','false'}; private String[] field_order_type_info = new String[]{'isActive','isEmailNotificationAllowed','externalId','isServiceAccount','ordersUiLocalTimeZoneId'}; }Response I'm getting from debug log:
CALLOUT_RESPONSE|[458]|<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Header><ResponseHeader xmlns="https://www.google.com/apis/ads/publisher/v201911"><requestId>e0f13da33a0db674b118a930cf0kij54</requestId><responseTime>685</responseTime></ResponseHeader></soap:Header><soap:Body><getCurrentUserResponse xmlns="https://www.google.com/apis/ads/publisher/v201911"><rval><id>245547652</id><name>Nerijus Urbietis</name><email>nerijus.urbietis@:).ie</email><roleId>-1</roleId><roleName>Administrator</roleName><isActive>true</isActive><isEmailNotificationAllowed>false</isEmailNotificationAllowed><isServiceAccount>false</isServiceAccount></rval></getCurrentUserResponse></soap:Body></soap:Envelope>