Announcement

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

    Is there a way to expose isomorphic services calls to javascript clients

    SmartClient Version: v10.0p_2015-06-25/Pro Deployment (built 2015-06-25)

    I would like to be able to call gwt/isomorphic services we have developed from legacy javascript. Is there support for this and if so can you provide some direction or point me to some docs as to how this might be done. That is I would like to expose service url, with JSON request, responses appropriate for client side AJAX. In a similar manner ( I think ) to the RESTHandler for data sources ??

    Thanks in advance

    #2
    Do you mean that you are trying to access data from DataSources within the browser via JavaScript? If so, you can use the SmartClient JavaScript API to work with DataSources that have been loaded via SmartGWT APIs.

    If you mean you want to make server calls, RestHandler is how you do that, but you seem aware of that so we're not sure what further question you have there.

    Comment


      #3
      Reading the docs I wasn't 100% sure RestHandler was what I wanted. Ill take a closer look,
      Thanks for the quick response

      Comment


        #4
        So I took a closer look at the com.isomorphic.servlet.RESTHandler docs. The docs status states the RESTHandler handles "datasource requests sent from REST clients". From what I can tell this handler implements crud operations on a data source but its not clear to me this can be used to dispatch custom REST services. What I'm looking to do is call a gwt service, ( my custom service code ?) via REST interface. Id really like to be able to dispatch services defined via myservice.app.xml .

        Thanks



        Comment


          #5
          You are probably reading docs from an older version. In the current release, RestHandler supports invoking services defined in an .app.xml file.

          Comment


            #6
            OK - So just to be clear - v10.0p_2015-06-25/Pro Deployment (built 2015-06-25) does not support this in any way ? Perhaps I could override a method to or something easily get this functionality ??

            Thanks

            Comment


              #7
              You can just create a servlet that calls your code. We haven't put any obstacles in the way of normal approaches like this.

              Comment


                #8
                OK great, thanks for the help

                Comment

                Working...
                X