
Code in flipkart side:global class SoapDemo1
{
webservice static List<Account> CreateAccount(string accName)
{
List<Account> accList=new List<Account>();
for(integer i=1;i<=2;i++)
{
Account a=new Account();
a.Name=accName;
accList.add(a);
}
if (accList.size() > 0)
{
Database.Insert(accList);
}
return accList;
}
}
public class InvokeHDFC
{
public String securityToken { get; set; }
public String password { get; set; }
public String username { get; set; }
public String AccountName { get; set; }
public List<Account> acList{get;set;}
public PageReference CallHDFC()
{
P2.soap part = new p2.soap();
p2.LoginResult lr = part.login(username,password+''+securityToken);
Generated_From_WSDL.SoapDemo1 obj1 = new Generated_From_WSDL.SoapDemo1();
obj1.sessionHeader = new Generated_From_WSDL.SessionHeader_element();
obj1.sessionHeader.sessionId = lr.SessionId;
accList=obj1.CreateAccount(AccountName);
return null;
}
}
I am generating multiple accounts on hdfc side and I will display the ID of each account generated on the flipkart side.
I have generated the wsdl files from hdfc side (one wsdlf file is from apex class say Generalwsdl.wsdl) & the other from partner api(partnerwsdl.wsdl)Now in fllikart side when I upload Generalwsdl.wsdl file and generate apex code, it throws error as unsupported anyType. so I commented all lines which have "anyType", but still it throws error.I have replaced "anyTpe" with "string" but still it is throwing error.I need help regarding this.I hope I am clear and if any other info is reqd I will share.Thankspooja biswasI am fine with the code in flipkart side if the wsdlf ifle