You need to sign in to do that
Don't have an account?
Nikhil Khandare 1
How to get session Id
Hi All,
I want to insert account record from one SF orgnisation to another SF org. In destination orgnaisation i have created below webservice method.
global class testSOAPAccInsert{
webservice static Id insertAcc(String name)
{
Account acc = new Account();
acc.Name = name;
insert acc;
return acc.Id;
}
}
I generated wsdl from it and created class using wsdl in source orgnisation. However, when i tried to invoke this method from class generated using wsdl i am getting illegeal session id error.
How would i get session id or how can i impelment login method in my global class. Please help.
Thanks,
Nikhil
I want to insert account record from one SF orgnisation to another SF org. In destination orgnaisation i have created below webservice method.
global class testSOAPAccInsert{
webservice static Id insertAcc(String name)
{
Account acc = new Account();
acc.Name = name;
insert acc;
return acc.Id;
}
}
I generated wsdl from it and created class using wsdl in source orgnisation. However, when i tried to invoke this method from class generated using wsdl i am getting illegeal session id error.
How would i get session id or how can i impelment login method in my global class. Please help.
Thanks,
Nikhil
Your only option will be to login with username / password from within your static webservice code. One way would be to use the api of salesforce because there is a login method. When searching for a login method in apex code, I found this thread that seems to be exactly what you are looking for
https://gist.github.com/richardvanhook/1245068