5 Replies Latest reply on May 27, 2015 5:49 PM by shawkins

    teiid + ws translator + write support

    dks.ait

      I have gone through some documentation - but could not conclusively decide whether the ws/rest translator/resource adapter provides update/insert/delete support too, or is it just a read only translator as of now?

      All the examples that could search were for fetching the data from either twitter or basic Customer service war.

      Also going through the documentation @ Web Service Data Sources - Teiid 8.11 (draft) - Project Documentation Editor  doesn't suggest anything.

       

      Please do provide me some pointers in case I am missing something.

       

      Thanks,

      Devesh.

       

      Some of the Links that have gone through :-

       

      https://developer.jboss.org/wiki/ExposeTwitterDataInTeiidUsingOAuthAuthorization

      https://developer.jboss.org/wiki/HowToConsumeAJSONRESTWebServiceInTeiidDesigner

      Kylin Soong . Blog

      https://github.com/teiid/teiid/tree/master/build/kits/embedded/examples/webservices-as-a-datasource

      teiid-quickstarts/webservices-as-a-datasource at master · teiid/teiid-quickstarts · GitHub

        • 1. Re: teiid + ws translator + write support
          shawkins

          It supports remote calls that are abstracted by procedures.  The meaning of the remote call is up to you.   When performing a rest/http operation you can specifying an update verb PUT/DELETE.

          1 of 1 people found this helpful
          • 2. Re: teiid + ws translator + write support
            dks.ait

            Thanks Steven,

             

            I would try it out and get back. In the meantime, if there are any examples/tutorials out there - they would help - I know I am being too greedy here- but a little speed gainer would be good to have.

            • 3. Re: teiid + ws translator + write support
              shawkins

              Can you be more specific as to your scenario, what type of service (rest, soap, general http) are you invoking?  What operation are you trying to do?  And do you have a payload?

               

              From the example you already have above, the base level ws call for rest/http is invokeHttp:

               

              EXEC MySourceModel.invokeHttp('GET', null, VARIABLES.qp, 'TRUE') - See more at: https://developer.jboss.org/wiki/HowToConsumeAJSONRESTWebServiceInTeiidDesigner#sthash.W2WDjuTq.dpuf

               

              The first argument indicates a GET is being performed, which can be changed depending upon whatever you would need.

              • 4. Re: teiid + ws translator + write support
                dks.ait

                Thanks again for quick response,

                 

                I am trying to expose a rest service through the teiid-embedded. The another cause of concern is the custom authentication mechanism of the rest service - it provides urls to the actual service post authentication. So are there any extendible plug-points in the teiid ws-translator where I can just add some custom code to get this working?

                 

                Thanks,

                Devesh.

                • 5. Re: teiid + ws translator + write support
                  shawkins

                  > So are there any extendible plug-points in the teiid ws-translator where I can just add some custom code to get this working?

                   

                  The current design of the ws translator / resource adapter is strictly for request / response scenarios.  If you need a stateful connection with a custom authentication scheme, then you may need a custom translator and/or resource adapter.  I don't think there will be sufficient hooks to do that as an extension.  See the salesforce translator for something that behaves similarly - the login result includes the url of the actual endpoint.  Then the SalesforceConnection will associate the session id with all subsequent usage of the connection and allows for multi-step processing such as batched results or bulk inserts.