I am using WSDL classes generated from the WSDL xml, to make the webservice callouts. I was making the callout synchronously, but later I want to change it to Asynchronous callouts. As we already know that the WSDL classes generated will be having Async classes. So, I am using the Async WSDL classes in conjunction with the Continuation
class.
Here I am posting sample code:
public Continuation startRequest(){
Integer TIMEOUT_INT_SECS = 120;
AsynWSDLClass.methodResponseFuture respFuture;
Continuation cont = new Continuation(TIMEOUT_INT_SECS);
cont.continuationMethod = 'processResponse';
AsynWSDLClass.exampleServicesPort service = new AsynWSDLClass.exampleServicesPort();
service.endpoint_x = 'https://api.example.com/dev/exampleService';
service.timeout_x = 120000;
try{
respFuture = service.beginExampleServiceMethod(cont, payload);
}catch(Exception e){
System.debug(e.getMessage());
return null;
}
System.debug('async is called - I am assuming that webservice callout initiated');
return cont;
}
public Object processResponse(){
System.debug('hello....response received');
//do some processing
return null;
}
So, I have called the startRequest()
method from other method. When I call this method I am getting the log statement async is called - I am assuming that webservice callout initiated
. But the callback method is not called.
I know that as the callout is asynchronous it may take some time. But my query is Where Can I see the async callout status in salesforce UI in the Monitoring section. How can I know that the webservie asyncronous callout is happened actually? If happened, how can I confirm that?
Please help on this.