You need to sign in to do that
Don't have an account?
IO Error in Invoking external webservice from apex class
i am using apex class like this..follows
global class YodleeLoginService {
webservice static List<object> cobrandLoginContext(string username) {
List<object> cobrandRespInfo = new List<object>();
yintegDomyexpensesCom.CobrandLoginServiceHttpSoap11Endpoint serviceobj=new yintegDomyexpensesCom.CobrandLoginServiceHttpSoap11Endpoint();
serviceobj.endpoint_x='http://171.16.44.40:8081/YodleeIntegration/services/CobrandLoginService';
yintegDomyexpensesComXsd.CobrandLoginResponse responseObj=new yintegDomyexpensesComXsd.CobrandLoginResponse();
responseObj=serviceobj.loginCobrand(cobrandId, appId, cobrandLogin, cobrandPassword);
//cobrandRespInfo.add(responseObj);
String language=responseObj.language;
return cobrandRespInfo;
}
}
/// Here how to return the object from the response or how to get the fileds value present in tne response
I am getting error like this...
(com.salesforce.results::Fault)#0
context = (null)
detail = (null)
faultcode = "soapenv:Client"
faultstring = "System.CalloutException: IO Exception: Read timed out
Class.yintegDomyexpensesCom.CobrandLoginServiceHttpSoap11Endpoint.loginCobrand: line 46, column 13
Class.YodleeLoginService.cobrandLoginContext: line 25, column 17
External entry point"
in an Alert box showing the above details .How to solve this ...please
You need to increase your timeout, or get your endpoint to respond faster.
To increase your timeout on a WSDL2Apex generated class (which is what looks like you're using), you set the timeout_x property to the number of milliseconds to wait.
e.g. serviceobj.timeout_x = 60000;
There are some callout limits as well, which you can review here:
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_callouts_timeouts.htm
I am having this issue, but only when I have the Apex class run as a scheduled job. When I run the apex through System Log everything works great. The call that is being made is just a status call to update statuses on a case based on certain criteria. This issue just started occurring last Thursday and no changes have been made to the application.
Are there issues with scheduling apex through the scheduled jobs?
Thanks
Dave