4 Replies Latest reply on May 14, 2014 9:20 AM by rareddy

    How to create a new Web Services Data Source (OData) connection profile

    teiidjbossuser


      Hi

       

      I have a procedure getbook(TEIID Webservice model operation) . I can see that exposed on OData as follows

      When I try to create a OData connection profile or use importer to create models I am unable to register the end point.

       

      <entry>

        <id>http://localhost:8080/odata/booksWebSvc.1/Procedures(Name='BooksInterface.GetBook',SchemaName='BooksWebSvc',VDBName='BooksWebSvc')</id>

        <title type="text" />

        <updated>2014-05-13T12:15:56Z</updated>

      - <author>

        <name />

        </author>

        <link rel="edit" title="Procedures" href="Procedures(Name='BooksInterface.GetBook',SchemaName='BooksWebSvc',VDBName='BooksWebSvc')" />

        <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ProcedureParams" type="application/atom+xml;type=entry" title="ProcedureParams" href="Procedures(Name='BooksInterface.GetBook',SchemaName='BooksWebSvc',VDBName='BooksWebSvc')/ProcedureParams" />

        <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Schemas" type="application/atom+xml;type=entry" title="Schemas" href="Procedures(Name='BooksInterface.GetBook',SchemaName='BooksWebSvc',VDBName='BooksWebSvc')/Schemas" />

        <category term="SYS.Procedures" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />

      - <content type="application/xml">

      - <m:properties>

        <d:Name>BooksInterface.GetBook</d:Name>

        <d:OID m:type="Edm.Int32" m:null="true" />

        <d:Description m:null="true" />

        <d:NameInSource m:null="true" />

        <d:UID>mmuuid:13ddb09f-179b-4438-b97f-b698292771b6</d:UID>

        <d:ReturnsResults m:type="Edm.Boolean">true</d:ReturnsResults>

        <d:VDBName>BooksWebSvc</d:VDBName>

        <d:SchemaName>BooksWebSvc</d:SchemaName>

        </m:properties>

        </content>

        </entry>

        • 1. Re: How to create a new Web Services Data Source (OData) connection profile
          rareddy

          Ashwinni,

           

          What is the endpoint you are trying for the importer?

           

          Also, trying to understand, what you are doing

           

          Teiid Designer --> OData Importer --> Teiid Odata --> Teiid VDB --> Teiid Web Service --> Teiid Procedure --> Some Source ?

           

          What is the intention behind importing the odata from teiid?

           

          Ramesh..

          • 2. Re: How to create a new Web Services Data Source (OData) connection profile
            teiidjbossuser

            Hi Ramesh,

            Thanks for the reply.

            This is the end point I am using - http://localhost:8080/odata/booksWebSvc.1/ , though I tried with few other combinations also.

            I am exactly doing Teiid Designer --> OData Importer --> Teiid Odata --> Teiid VDB --> Teiid Web Service --> Teiid Procedure --> Some Source

            I have CRUD operations defined in my Teiid webservice model and able to consume the operations through SOAP/REST clients.

            I am interested to know if I can and how to consume these webservices model operations through OData.

             

            I get exception when I try to create a Teiid OData importer connection -  org.jboss.resteasy.spi.NotAcceptableException: No match for accept header

            When I try consuming them as any function imports I get "ServerErrorException with message Cannot infer EdmType for java type: org.teiid.core.types.SQLXMLImpl"


            Cheers

            • 3. Re: How to create a new Web Services Data Source (OData) connection profile
              rareddy

              *All* VDBs deployed in the Teiid already expose OData interface. Why you need to re-import into a separate VDB? read the OData support in Teiid here OData Support - Teiid 8.8 (draft) - Project Documentation Editor

               

              Ramesh..

              • 4. Re: How to create a new Web Services Data Source (OData) connection profile
                rareddy

                BTW, web services is additional layer on top of the VDB, much like OData, it adds the web access layer over your procedure, not any business logic. Your procedure is the main artifact that handles all your CRUD operations, so when using OData it does not go through Web Service layer, but works directly on top of your procedure, thus avoiding the additional web layer. For doing CRUD operations, you do not need to define the procedures, just define your views and provide the insert/update/delete transformations as needed, then use OData to issue the read/update/delete operations as described in the link I provided above.

                 

                As per the exception above if you can give a test case, I can re-test, but that seems to be a bug. Import process should have worked as expected, even though that is verbose as I explained above.

                 

                Ramesh..