4 Replies Latest reply on Aug 31, 2012 3:01 PM by Steven Hawkins

    Change the source based on Procedure parameters

    tanmoypalit Newbie

      Hi,

       

      I am using a SOAP service which has four completely different WSDL for four regions. As the response is identical, the XQuery will be exactly identical so I don't want to make four view models instead write one virtual procedure and pass the region information as a parameter to the procedure and change the source depending on the parameter.

      Following is my current XQUery:

      CREATE VIRTUAL PROCEDURE

      BEGIN

                DECLARE string VARIABLES.INPUT_ENDPOINT;

                VARIABLES.INPUT_ENDPOINT = ServiceManagerServiceView.getDataReport.soapstring;

                SELECT DataHeader.* FROM (EXEC ServiceManagerService.invoke(binding => 'SOAP11', action => '', request => XMLPARSE(DOCUMENT VARIABLES.INPUT_ENDPOINT))) AS ws, XMLTABLE('/*:getHeaderResponse/return/response/report/record' PASSING ws.result COLUMNS ATTRIBUTES XML PATH 'attribute') AS DataHeader;

      END

       

      I want to change the ServiceManagerService depneding on a parametere passed to the procedure. Is there any way to do this?

       

      regards

      Tanmoy Palit