function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
TechBlossomTechBlossom 

Compile error : invalid type

I am getting Invalid type error when I am running the class:

 

public with sharing class UpdateAccountCurrentBalance {

public UpdateAccountCurrentBalance(){

}

public void CurrentBalanceUpdate(){

aablCredentials__c cred = [Select username__c,password__c from aablCredentials__c];
OSI2MRMcurrBalanceWebservices.CFTFCUMemWsSoap ws = new OSI2MRMcurrBalanceWebservices.CFTFCUMemWsSoap();
//a.CServReturn response = osi.IsAlive(cur.username__c, cur.password__c);
//system.debug('Connect to OSI #################### '+response);
AccountBalances ab = ws.GetAccountBalances(cur.username__c, cur.password__c,'PERSNBR',1234);
//system.debug('The Account Balances for the current member is #################### '+response);
}

}

 

The WSDL for the above class is:

//Generated by wsdl2apex

public class OSI2MRMcurrBalanceWebservices {
public class IsAliveResponse_element {
public OSI2MRMcurrBalanceWebservices.CServReturn IsAliveResult;
private String[] IsAliveResult_type_info = new String[]{'IsAliveResult','http://#######.com/FTFCUMemWs','CServReturn','0','1','false'};
private String[] apex_schema_type_info = new String[]{'http://#######.com/FTFCUMemWs','true','false'};
private String[] field_order_type_info = new String[]{'IsAliveResult'};
}
public class GetAccountBalancesResponse_element {
public OSI2MRMcurrBalanceWebservices.AccountBalances AccountBalances;
private String[] AccountBalances_type_info = new String[]{'AccountBalances','http://#######.com/FTFCUMemWs','AccountBalances','0','1','false'};
private String[] apex_schema_type_info = new String[]{'http://#######.com/FTFCUMemWs','true','false'};
private String[] field_order_type_info = new String[]{'AccountBalances'};
}
public class CFTFCUMemWsSoap {
public String endpoint_x = 'http://#######/FTFCUMemWs/FTFCUMemWs.asmx';
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;
private String[] ns_map_type_info = new String[]{'http://firsttechfed.com/FTFCUMemWs', 'OSI2MRMcurrBalanceWebservices'};
public OSI2MRMcurrBalanceWebservices.CServReturn IsAlive(String cuid,String cuidp) {
OSI2MRMcurrBalanceWebservices.IsAlive_element request_x = new OSI2MRMcurrBalanceWebservices.IsAlive_element();
OSI2MRMcurrBalanceWebservices.IsAliveResponse_element response_x;
request_x.cuid = cuid;
request_x.cuidp = cuidp;
Map<String, OSI2MRMcurrBalanceWebservices.IsAliveResponse_element> response_map_x = new Map<String, OSI2MRMcurrBalanceWebservices.IsAliveResponse_element>();
response_map_x.put('response_x', response_x);
WebServiceCallout.invoke(
this,
request_x,
response_map_x,
new String[]{endpoint_x,
'http://#######.com/FTFCUMemWs/IsAlive',
'http://#######.com/FTFCUMemWs',
'IsAlive',
'http://#######.com/FTFCUMemWs',
'IsAliveResponse',
'OSI2MRMcurrBalanceWebservices.IsAliveResponse_element'}
);
response_x = response_map_x.get('response_x');
return response_x.IsAliveResult;
}
public OSI2MRMcurrBalanceWebservices.AccountBalances GetAccountBalances(String strUid,String strPwd,String IdTypCd,String Id) {
OSI2MRMcurrBalanceWebservices.GetAccountBalances_element request_x = new OSI2MRMcurrBalanceWebservices.GetAccountBalances_element();
OSI2MRMcurrBalanceWebservices.GetAccountBalancesResponse_element response_x;
request_x.strUid = strUid;
request_x.strPwd = strPwd;
request_x.IdTypCd = IdTypCd;
request_x.Id = Id;
Map<String, OSI2MRMcurrBalanceWebservices.GetAccountBalancesResponse_element> response_map_x = new Map<String, OSI2MRMcurrBalanceWebservices.GetAccountBalancesResponse_element>();
response_map_x.put('response_x', response_x);
WebServiceCallout.invoke(
this,
request_x,
response_map_x,
new String[]{endpoint_x,
'http://#######.com/FTFCUMemWs/GetAccountBalances',
'http://#######.com/FTFCUMemWs',
'GetAccountBalances',
'http://#######.com/FTFCUMemWs',
'GetAccountBalancesResponse',
'OSI2MRMcurrBalanceWebservices.GetAccountBalancesResponse_element'}
);
response_x = response_map_x.get('response_x');
return response_x.AccountBalances;
}
}
public class GetAccountBalances_element {
public String strUid;
public String strPwd;
public String IdTypCd;
public String Id;
private String[] strUid_type_info = new String[]{'strUid','http://www.w3.org/2001/XMLSchema','string','0','1','false'};
private String[] strPwd_type_info = new String[]{'strPwd','http://www.w3.org/2001/XMLSchema','string','0','1','false'};
private String[] IdTypCd_type_info = new String[]{'IdTypCd','http://www.w3.org/2001/XMLSchema','string','0','1','false'};
private String[] Id_type_info = new String[]{'Id','http://www.w3.org/2001/XMLSchema','string','0','1','false'};
private String[] apex_schema_type_info = new String[]{'http://#######.com/FTFCUMemWs','true','false'};
private String[] field_order_type_info = new String[]{'strUid','strPwd','IdTypCd','Id'};
}
public class IsAlive_element {
public String cuid;
public String cuidp;
private String[] cuid_type_info = new String[]{'cuid','http://www.w3.org/2001/XMLSchema','string','0','1','false'};
private String[] cuidp_type_info = new String[]{'cuidp','http://www.w3.org/2001/XMLSchema','string','0','1','false'};
private String[] apex_schema_type_info = new String[]{'http://#######.com/FTFCUMemWs','true','false'};
private String[] field_order_type_info = new String[]{'cuid','cuidp'};
}
public class Account {
public OSI2MRMcurrBalanceWebservices.ArrayOfAccountRole RolesOnAcct;
public String AcctNbr;
public String MjAcctTypCd;
public String MiAcctTypCd;
public String ProductNameTx;
public String NickNameTx;
public String OpenDate_YYYYMMDD;
public Decimal CurrentBalance;
public Decimal AvailableBalance;
public String StatusCd;
public String StatusTx;
public String TaxOwnerNbrType;
public String TaxOwnerNbr;
public String TaxOwnerName;
private String[] RolesOnAcct_type_info = new String[]{'RolesOnAcct','http://#######.com/FTFCUMemWs','ArrayOfAccountRole','0','1','false'};
private String[] AcctNbr_att_info = new String[]{'AcctNbr'};
private String[] MjAcctTypCd_att_info = new String[]{'MjAcctTypCd'};
private String[] MiAcctTypCd_att_info = new String[]{'MiAcctTypCd'};
private String[] ProductNameTx_att_info = new String[]{'ProductNameTx'};
private String[] NickNameTx_att_info = new String[]{'NickNameTx'};
private String[] OpenDate_YYYYMMDD_att_info = new String[]{'OpenDate_YYYYMMDD'};
private String[] CurrentBalance_att_info = new String[]{'CurrentBalance'};
private String[] AvailableBalance_att_info = new String[]{'AvailableBalance'};
private String[] StatusCd_att_info = new String[]{'StatusCd'};
private String[] StatusTx_att_info = new String[]{'StatusTx'};
private String[] TaxOwnerNbrType_att_info = new String[]{'TaxOwnerNbrType'};
private String[] TaxOwnerNbr_att_info = new String[]{'TaxOwnerNbr'};
private String[] TaxOwnerName_att_info = new String[]{'TaxOwnerName'};
private String[] apex_schema_type_info = new String[]{'http://#######.com/FTFCUMemWs','true','false'};
private String[] field_order_type_info = new String[]{'RolesOnAcct'};
}
public class AccountRole {
public String RoleCd;
public String RoleTx;
private String[] RoleCd_att_info = new String[]{'RoleCd'};
private String[] RoleTx_att_info = new String[]{'RoleTx'};
private String[] apex_schema_type_info = new String[]{'http://#######.com/FTFCUMemWs','true','false'};
private String[] field_order_type_info = new String[]{};
}
public class ArrayOfAccount {
public OSI2MRMcurrBalanceWebservices.Account[] Account;
private String[] Account_type_info = new String[]{'Account','http://#######.com/FTFCUMemWs','Account','0','-1','true'};
private String[] apex_schema_type_info = new String[]{'http://#######.com/FTFCUMemWs','true','false'};
private String[] field_order_type_info = new String[]{'Account'};
}
public class CServReturn {
public Integer ErrorNum;
public String ErrorType;
public String Message;
public String Response;
private String[] ErrorNum_type_info = new String[]{'ErrorNum','http://www.w3.org/2001/XMLSchema','int','1','1','false'};
private String[] ErrorType_type_info = new String[]{'ErrorType','http://www.w3.org/2001/XMLSchema','string','0','1','false'};
private String[] Message_type_info = new String[]{'Message','http://www.w3.org/2001/XMLSchema','string','0','1','false'};
private String[] Response_type_info = new String[]{'Response','http://www.w3.org/2001/XMLSchema','string','0','1','false'};
private String[] apex_schema_type_info = new String[]{'http://#######.com/FTFCUMemWs','true','false'};
private String[] field_order_type_info = new String[]{'ErrorNum','ErrorType','Message','Response'};
}
public class AccountBalances {
public OSI2MRMcurrBalanceWebservices.ArrayOfAccount Accounts;
public Integer ErrorNumber;
public String ErrorMsg;
private String[] Accounts_type_info = new String[]{'Accounts','http://#######.com/FTFCUMemWs','ArrayOfAccount','0','1','false'};
private String[] ErrorNumber_att_info = new String[]{'ErrorNumber'};
private String[] ErrorMsg_att_info = new String[]{'ErrorMsg'};
private String[] apex_schema_type_info = new String[]{'http://#######.com/FTFCUMemWs','true','false'};
private String[] field_order_type_info = new String[]{'Accounts'};
}
public class ArrayOfAccountRole {
public OSI2MRMcurrBalanceWebservices.AccountRole[] AccountRole;
private String[] AccountRole_type_info = new String[]{'AccountRole','http://#######.com/FTFCUMemWs','AccountRole','0','-1','true'};
private String[] apex_schema_type_info = new String[]{'http://#######.com/FTFCUMemWs','true','false'};
private String[] field_order_type_info = new String[]{'AccountRole'};
}
}

 

Any kind of help is appreciated!

Thanks,

ryanjuptonryanjupton

SamWise. I moved this to APIs and Integration. I think it's more appropriate there.