You need to sign in to do that
Don't have an account?
Andyk
Connecting to salesforce from java applet.
Hello,
Can anyone tell me how you can connect to salesforce from java applet which is invoked from scontrol ?? I downloaded the wsdl created the java stubs etc i was able to compile the code just fine, but when i run it from an applet i get class not found exception, i feel it doesn't get the path com.sforce.enterprise.fault which i am importing in the code at runtime.
Any ideas whether it's possible if yes i can someone point me to right direction.
Thanks,
Anand
URL wsdlLocation = this.getClass().getClassLoader().getResource("META-INF/enterprise.wsdl");
if (wsdlLocation == null) {
WebServiceException e = new WebServiceException("enterprise.wsdl not found!");
}
port = new SforceService(wsdlLocation, new QName("urn:enterprise.soap.sforce.com", "SforceService")).getSoap();
} catch (Exception wse) { }
try {
loginResponse = port.login(username, password);
} catch (Exception e) {}
binding = (SoapBindingStub) new SforceServiceLocator()
.getSoap();
} catch (ServiceException ex1) {
System.out.println(ex1.getMessage());
return;
}
try {
lr = binding.login(userName, pwd);
} catch (UnexpectedErrorFault ex2) {
System.out.println(ex2.getExceptionMessage() + "\n\n");
return;
} catch (LoginFault ex2) {
System.out.println(ex2.getExceptionMessage() + "\n\n");
return;
} catch (RemoteException ex2) {
System.out.println(ex2.getMessage() + "\n\n");
return;
}