3 Replies Latest reply on Sep 28, 2009 1:09 PM by rareddy

    Webservices to Relational Data in Teiid

      Greetings!
      I am having a webservice that will return a long XML as string. I need to convert that to the relational model where the individual nodes represent the table Columns. For example if the XML data is like

      test001
      test1002

      Iam in need of having a table that has empname and empid as columns having 2 records.
      Could you please tell me the steps on how this can be achieved?
      Thanks and Regards,
      Swaminathan.V

        • 1. Re: Webservices to Relational Data in Teiid
          rareddy

          You need to use the Teiid Designer and create Web Service as Relational Source model, check out the below link for help with Designer

          http://docs.jboss.org/teiid/designer/6.0/user-guide/importers-chapter.html#wsdl-to-relational-import-section

          • 2. Re: Webservices to Relational Data in Teiid

            Hi,

            Thanks for your reply. I have tried the web services to relational model importer. When use that a relational model is created with 2 tables corresponding to the request and response objects. When I query the response object table it gives an XML output of the data got from the web service.

            Actually I want to create another relational table where the elements in the XML output can be mapped to the columns of the table and then by using the select statement on the table the data in the XML can be fetched.

            Please guide as to how this can be achieved in the designer.

            Thanks,
            Swaminathan.

            • 3. Re: Webservices to Relational Data in Teiid
              rareddy

              Swaminathan,

              Did you create your model from WSDL?, if you did it will create two relational tables in your model, xxx_SoapIn and xxx_SoapOut. You can not preview data using these tables. To view the data, you need to create a VDB and add this model to the VDB and create the connector binding and execute it.

              if you issue your query in the form

              SELECT b.*
              FROM xxx_SoapIn a
              JOIN xxx_SoapOut b
              ON a.ResposeOut = b.ResponseIn
              WHERE a.criteria=??
              


              "criteria" is column on the "SoapIn" table. That should get you the results in tabular format you are looking for.