0 Replies Latest reply on Apr 19, 2011 5:26 AM by mushy

    How to pass input paramater of a webservice to SQL transformation of a mapping class

    mushy

      Ted,

       

      How can we get the input parameter of a webservice available to SQL transformation mapping class. We need to add a filter based on the input parameter for instance.

       

      Let's assume a Manager which has n number of employees.

      In this scenario lets say Employee id is passed as an input parameter to the web service.

      And the output should have following hierarchy of  elements in the  output xml. Manager->Employeee

       

      So when we created the output view, we have top most Mapping class of Manager and its sub mapping class Employee.

      We are passing ManagerId as Input set parameter to the employee.

       

      So transformation sql of Manager Mapping class is Select * from manger

      And transformation sql of Emplyee Mapping class is Select employee.name, employee.age from employee where manager.id=input.manager_id

       

      Now the operation sql is

       

      Variables.In_EmpId=........... xpath of empid

       

      SELECT * FROM ServiceOutput_View.Manager_OutputView WHERE ServiceOutput_View.Manager_OutputView.Manager_Output.Manager_Output_Instance.Employee_Output.Employee_Output_Instance.ID = VARIABLES.IN_EMLOYEEID;

       

       

       

       

      We are getting the right manger in response and all the associated employees instead of the specific employee passed as input.

       

      This is the level where we need the input param, so that we can filter the specific employee by adding a where clause based on input.

       

      Or else do we have any other way of getting the input parameter available to multilevel nested transformation of mapping class.

       

      (e.g. ViceChancelor--->DepttHeads--->Professors--->Students) so if a StudentID is entered as an input to the webservice then that studentID should be available at the "Students" (bottom most level) of this hierarchy.

       

      Any help will be appreciated?