You need to sign in to do that
Don't have an account?
Salesforce webservice consumption in Java issue
Hi Guys,
I have created a webservice in salesforce and generated WSDL file for it.And using some salesforce tools i have generated jar file and added it into my application .Now, i am facing login issue in it.
It says
INVALID_SESSION_ID: Invalid Session ID found in SessionHeader: Illegal Session
i want to know how to saolve this issue .
Below is my code:
try {
ConnectorConfig c = new ConnectorConfig();
c.setUsername("giribhushan.svg@gmail.com");
c.setPassword("giribhushanguru123NCD8avhYG3G7Nunzy1fz0FsH");
SoapConnection sc = Connector.newConnection(c);
c.setSessionId(sc.getSessionHeader().getSessionId());
System.out.print("session id "+sc.getSessionHeader().getSessionId());
System.out.print("Institutes "+sc.getInstitutes());
} catch (ConnectionException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Thank you
Hi,
Find below Java code used to login using Partner WSDL. let me know if you need for the enterprise one: