Skip to Content
0
Former Member
Apr 27, 2012 at 08:41 PM

making request failing from android to SUP.

24 Views

Hi All

I am using the below code to make request and fetch the oData XML from gateway and then parse it but it is throwing a class cast exception error as below

com.sybase.mobile.lib.client.SUPServerRmiCalls:makeRequest:246) Exception while making request

public SDMRequestManager getRequestmanager() {

if (requestmanager == null) {

if (parameters == null) {

parameters = new SDMConnectivityParameters();

parameters.setBaseUrl(getbaseurl());

parameters.setUserName(getusername());

parameters.setUserPassword(getpassword());

}

requestmanager = new SDMRequestManager(getLogger(), preferences,

parameters, 2);

}

return requestmanager;

}

---------------------------------------------------------------------

ISDMBundleRequest requests = new SDMBundleRequest();

HomePage hp = new HomePage();

serviceDocPath = hp.appEndpoint();

ISDMRequest sdrequest = TrialApp.buildRequest(serviceDocPath + "/", this);

requests.addRequest(sdrequest);

ISDMRequest screquest = TrialApp.buildRequest(serviceDocPath + HomePage.METADATA, this);

requests.addRequest(screquest);

ISDMRequest sRequest = TrialApp.buildRequest(searchURL, this);

requests.addRequest(sRequest); TrialApp.getInstance().getRequestmanager().makeRequest(requests);

request you to share ideas in solving the problem.

Thanks

Santosh