I am developing a windows phone 8 silverlight application and I am using MFP v6.3
The following problem occurs.
If I make a call to a MobileFirst adapter and place the app in the background before that call returns, when I reactivate the app it crashes with this exception.
ExceptionObject {System.NullReferenceException: Object reference not set to an instance of an object.
   at IBM.Worklight.WLRequest.responseCallback(IAsyncResult asyncResult)
   at System.Net.Browser.ClientHttpWebRequest.<>c__DisplayClass1d.<InvokeGetResponseCallback>b__1b(Object state2)}  System.Exception {System.NullReferenceException}
This happens for any call I have tried.
Does anybody know why this exception is thrown?
Secondly, I would like to know if there is a way to cancel a call. So that I can do it when my app is deactivated.
EDIT: adding adapter call implementation
public void getInvoices(IShowAndProceed showAndProceedVM, JObject parameter)
        {
    String myContextObject = "MyAppWP8";
    WLRequestOptions invoicesOptions = new WLRequestOptions();
    invoicesOptions.setInvocationContext(myContextObject);
    WLProcedureInvocationData InvoicesInvocationData = new WLProcedureInvocationData("BillingAdapter", "MyInvoicesProcedure");
    InvoicesInvocationData.setParameters(new Object[] { parameter });
    WLClient.getInstance().invokeProcedure(InvoicesInvocationData, new InvoicesInvokeListener(showAndProceedVM), invoicesOptions);
}
 
    