Announcement

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

    RPCManager and browser same-origin policy

    Hi,
    i have a ListGrid component wich has a DataSource in a remmote server: http://192.168.2.3:7001/rest/

    So when i try use it from smartGWT i get this error: "SmartClient can't directly contact URL [...] due to browser same-origin policy. Remove the host and port number (even if localhost) to avoid this problem, or use XJSONDataSource for JSONP protocol (which allows cross-site calls), or use the server-side HttpProxy included with SmartClient Server."

    I saw that i can use RPCManager from smartGWT without SmartGWT server.

    Where could I found examples?

    Thanks

    #2
    some one knows how i can do it? thanks!

    Comment


      #3
      Just make sure your application is served from the same server as your data source is and you are fine. This is a browser security feature, not a SGWT limitation. The same applies for the SGWT server framework.

      Comment


        #4
        First of all thanks for your reply!

        I can't do it because remote url must be in other server. I'm using a Restful server that isnt in my gwt project.

        So, can i solve my problem some way?

        Comment


          #5
          Use the SGWT server framework and it will automatically proxy the request. Otherwise you will need to implement your own server proxy.

          Comment


            #6
            Ok, so i will try it. Thanks for all!

            Comment

            Working...
            X