on 10-06-2014 7:48 AM
Hi,
I am trying to use $filter option like this:
GET http://services.odata.org/OData/OData.svc/Products?$filter=Name eq 'Milk'
200 OK
{
"odata.metadata": "http://services.odata.org/OData/OData.svc/$metadata#Products",
"value": [
{
"ID": 1,
"Name": "Milk",
"Description": "Low fat milk",
"ReleaseDate": "1995-10-01T00:00:00",
"DiscontinuedDate": null,
"Rating": 3,
"Price": 3.5
}
]
}
Same from sdk:
String path = URLEncoder.encode("Products?$filter=Name eq 'Milk'", "UTF-8");
ODataResponseSingle response = store.executeReadEntitySet(path, null);
10-06 09:44:18.719: E/AndroidRuntime(7261): FATAL EXCEPTION: Thread-5377
10-06 09:44:18.719: E/AndroidRuntime(7261): java.lang.NullPointerException
10-06 09:44:18.719: E/AndroidRuntime(7261): at com.sap.smp.client.odata.online.PayloadHandler.getHandler(PayloadHandler.java:352)
10-06 09:44:18.719: E/AndroidRuntime(7261): at com.sap.smp.client.odata.online.ODataOnlineStrategyAsync.processResult(ODataOnlineStrategyAsync.java:495)
10-06 09:44:18.719: E/AndroidRuntime(7261): at com.sap.smp.client.odata.online.ODataOnlineStrategyAsync$CommunicationListener.onResponseReceived(ODataOnlineStrategyAsync.java:126)
10-06 09:44:18.719: E/AndroidRuntime(7261): at com.sap.smp.client.httpc.HttpConversationManager$ConversationFlow.processResponse(HttpConversationManager.java:1403)
10-06 09:44:18.719: E/AndroidRuntime(7261): at com.sap.smp.client.httpc.HttpConversationManager$ConversationFlow.run(HttpConversationManager.java:905)
10-06 09:44:18.719: E/AndroidRuntime(7261): at com.sap.smp.client.httpc.HttpConversationManager$DelegatingRunnable.run(HttpConversationManager.java:1934)
10-06 09:44:18.719: E/AndroidRuntime(7261): at java.lang.Thread.run(Thread.java:856)
Anyone else facing this? What I am missing here or is this the bug?
Hi,
I am facing the same issue if it is solved please provide me required code.
Thanks in advance.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I am a bit confused. That would mean that I would have to use some lower layer APIs and loose the actual benefit of using OData sdk. Using com.sap.mobile.lib.request.RequestManager is pretty much equal to HttpURLConnection. I guess I would loose offline feature too using RequestManager.
Did I understood right, that API com.sap.smp.client.odata.online.OnlineODataStore is so restricted that I cannot basic OData features, like $filter?
BR
-JTN
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.