NullReference exception when reactivating an application before calling the MobileFirst adapter

I am developing an application for Windows Phone 8 silverlight and I am using MFP v6.3

The following problem occurs.

If I make a call to the MobileFirst adapter and place the application in the background before this call returns, when I activate the application again, it will work 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 tried.
Does anyone know why this exception is thrown?

Secondly, I would like to know if there is a way to cancel the call. So that I can do it when my application is disconnected.

EDIT: Adding Adapter-to-Adapter 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);
}
+4
source share
1 answer

№1:
. , , ( ).

: , PMR.

№2:
"" . .

+1

All Articles