Skip to main content
Hello friends

I have two salesforce accounts: flipkart(this is the source) and hdfc(this is the destination).

I am calling a method of hdfc in flipkart.

here is the code in hdfc 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;

}

}

Code in flipkart side:

 

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.

Thanks

pooja biswas

I am fine with the code in flipkart side if the wsdlf ifle

 
2 respuestas
  1. 26 ago 2016, 07:02
    Hi sandhya

    I tried the same thing, its not working

    Thanks

    pooja
0/9000