Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    RestDataSource

    Hi

    I have been using RPC services, and I'm wondering how the RestDataSource fetches data from the RPC services?

    #2
    Problem with XML requests (instead of get/postParams)

    I am trying to integrate the SmartGWT RestDataSource, which works fine for the default DSProtocol.GETPARAMS en DSProtocol.POSTPARAMS.

    Now I would like to receive the requests in XML (which enables a more clean backend integration). I have tried to set the OperationBindings with DSProtocol.POSTMESSAGE (also tried POSTXML) but am not able to make it work. Am I missing something or is there some example code for this?

    Below is a part of the modification I made to the RestDataSource sample:

    OperationBinding fetch = new OperationBinding(DSOperationType.FETCH, "server/rest/");
    fetch.setDataProtocol(DSProtocol.POSTMESSAGE);
    fetch.setDataFormat(DSDataFormat.XML);
    ...

    countryDS.setOperationBindings(fetch, add, update, remove);
    Last edited by teseling; 21 Nov 2008, 14:56.

    Comment


      #3
      Please take a look at this thread - the enum values were wrong, and it was corrected in a nightly build.

      Comment

      Working...
      X