Hello,
We are using Smartgwt.mobile version 1.0 downloaded from the nightlies on the 17th Jan.
We have existing smartgwt apps which are working perfectly and connecting to our server using REST methods.
We would like to now connect a mobile app.
Unfortunately our requests to the server are failing as the mobile Request Method is GET.
In smartgwt we used the
option.
This is not in the mobile DataSource class. Is there a replacement or another way to set this?
We have tried setting
in the transform request method but this results in this error:
Is there a way of setting the Request Method to POST?
When creating a GET method to test the mobile app, we are getting 415 Unsupported Media Type. Looking at the difference between the headers from a smartgwt request and a .mobile request we can see that the Content-Type:application/json is missing.
When trying to set
it doesn't seem to have any effect. Our REST services consume JSON. Again, all is working perfectly with smartgwt.
Kind Regards,
Jeni
We are using Smartgwt.mobile version 1.0 downloaded from the nightlies on the 17th Jan.
We have existing smartgwt apps which are working perfectly and connecting to our server using REST methods.
We would like to now connect a mobile app.
Unfortunately our requests to the server are failing as the mobile Request Method is GET.
In smartgwt we used the
Code:
setDataProtocol(DSProtocol.POSTMESSAGE);
This is not in the mobile DataSource class. Is there a replacement or another way to set this?
We have tried setting
Code:
dsRequest.setHttpMethod(RequestBuilder.POST);
Code:
java.lang.UnsupportedOperationException: In setting the request data, failed to handle case protocol:GETPARAMS at com.smartgwt.mobile.client.data.DataSource._sendGWTRequest(DataSource.java:1207) at com.smartgwt.mobile.client.data.DataSource.sendDSRequest(DataSource.java:707) at com.smartgwt.mobile.client.data.DataSource.performDSOperation(DataSource.java:683) at com.smartgwt.mobile.client.data.DataSource.fetchData(DataSource.java:631) at com.smartgwt.mobile.client.data.ResultSet.fetchServerData(ResultSet.java:176) at com.smartgwt.mobile.client.data.ResultSet.getRange(ResultSet.java:343) at com.smartgwt.mobile.client.widgets.tableview.TableView._refreshRows(TableView.java:1333) at com.smartgwt.mobile.client.widgets.tableview.TableView.setData(TableView.java:1132) at com.smartgwt.mobile.client.widgets.tableview.TableView.setData(TableView.java:1) at com.smartgwt.mobile.client.widgets.DataBoundComponent._filterWithCriteria(DataBoundComponent.java:582) at com.smartgwt.mobile.client.widgets.DataBoundComponent._filter(DataBoundComponent.java:565) at com.smartgwt.mobile.client.widgets.DataBoundComponent.fetchData(DataBoundComponent.java:540) at com.smartgwt.mobile.client.widgets.DataBoundComponent.fetchData(DataBoundComponent.java:534) at com.ice.avalanchemobile.client.pages.AppointmentPanel.<init>(AppointmentPanel.java:45) at com.ice.avalanchemobile.client.Client.runApp(Client.java:43) at com.ice.avalanchemobile.client.Client.startup(Client.java:33) at com.ice.avalanchemobile.client.MainEntryPoint.onModuleLoad(MainEntryPoint.java:28) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:406) at com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:200) at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:526) at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364) at java.lang.Thread.run(Thread.java:722)
When creating a GET method to test the mobile app, we are getting 415 Unsupported Media Type. Looking at the difference between the headers from a smartgwt request and a .mobile request we can see that the Content-Type:application/json is missing.
When trying to set
Code:
dsRequest.setContentType("application/json");
Kind Regards,
Jeni
Comment