Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

DS Response is returning null due to JSON not being identified by DMI Handler

$
0
0
HI
I am migrating the existing application which runs on SmartClient 6.5.1 to version v91p_2014-05-30_Enterprise.

I am testing the application for compatibility with IE 8 which is currently being used.

The problem i face is when a call of Fetch is made from the application with a criteria, the call reaches the DMI Handler but the criteria is not getting received. I am pasing the criteria as aJSON

Example :
---------
Call from .js file:
----------------
DataSource.getDataSource("sample.ds.xml").fetchData({masterName:"searchString"},<<call back function>>);

sampleds.xml contains :
-----------------------

<operationBinding id="sample" operationType="fetch" sqltype="generic" serverMethod="fetchDataValue">
<serverObject lookupstyle="spring" bean="com.sample.Example"/>
</operationBinding>


the DMI Handler looks like this:
------------------------------

public Class Example {
public DSResponse fetchDataValue(MasterDetails master,DSRequest request) {
String masterName = master.getMasterName();

DSresponse response = new DSResponse();

response.setData(masterName);

}
}

MasterDetails.java
==============
public Class MasterDetails implements serializable {

private String masterName;

public String getMasterName() {

return masterName;
}

public setMasterName(String master) {

this.masterName = master;
}

}
Earlier the same code was working for 6.5.1 but for the latest version the DSResponse is null.

I am also not sure how the JSON object was getting mapped to this POJO which is now failing post Upgrade.

Kindly, please help

Regards

Mohammed Shahid Nawaz

Viewing all articles
Browse latest Browse all 4756

Trending Articles