You need to sign in to do that
Don't have an account?
How to Call WebService Method in Java
Hi all,
I am trying to use apex class webService method in java. But it is giving following error
Details are as following
Apex Class
Java Code:
public class trySendingEmail {
public static void main(String[] args) throws Exception {
login(); //general login code in method
//sendEmail();
WebServiceAccountPlanBindingStub wbind = new WebServiceAccountPlanBindingStub();
Plan vPlan = new Plan();
vPlan.setName( "Namita");
vPlan.setPlanId("abcdNewPlan");
vPlan.setPlanningPeriod(null);
vPlan.setPlanNumber(1234);
// This line gives the error
Plan endresult = wbind.createAccountPlan(vPlan);
//System.out.println("----------------"+endresult);
}
}
Can anybody please tell me where am i going wrong
My problem has been Solved. There were some lines i was missing.
i am putting correct Java Code Below:
All Answers
My problem has been Solved. There were some lines i was missing.
i am putting correct Java Code Below:
@TryCoding
I'm trying to do the same thing. I'm new to SFDC and Java. I'm trying to understand the code you have here, but got lost
login();
What does the above code do? I understood other parts of your code but failed to understand what's going on here. Would you please explain this part of your code for me? It would be of great help.
Thank you,
Sunny_Slp