3 Replies Latest reply: Jan 25, 2013 8:39 AM by cbritez RSS

    Run an ODI Scenario from APEX


      I need to run an ODI 11g scenario from APEX.

      Any idea?. Web Services?

      How can i execute http://localhost:20910/oraclediagent/OdiInvoke.wsil from APEX ??
      Thanks in advance.

      Edited by: Alex_M on 14-sep-2012 15:01
        • 1. Re: Run an ODI Scenario from APEX
          Hi Alex,
          Did you solve this? If Yes, could you please share the solution with me.
          Thanks in advance,
          • 2. Re: Run an ODI Scenario from APEX
            Jörg Lang
            Hi there,
            I have it working to start scenarios from apex

            See my post: Re: Problem on APEX 4.2 while accessing Oracle ODI Web services

            I looks like that there is a problem when the "Web Service Reference" is based on wsdl.

            So just create it manually as following:

            URL: http://localhost:20910/oraclediagent/OdiInvoke
            Action: invokeStartScen
            SOAP Version: 1.1

            SOAP Envelop:
            <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:odi="xmlns.oracle.com/odi/OdiInvoke/">
                     <!--You may enter the following 2 items in any order-->
                        <!--You may enter the following 3 items in any order-->
                        <OdiUser> put here the user (not the repository credentials)</OdiUser>
                        <OdiPassword> put here the password </OdiPassword>
                        <WorkRepository> put here the workrepository</WorkRepository>
                        <ScenarioName> put here the name </ScenarioName>
                        <ScenarioVersion> put here the version</ScenarioVersion>
                        <Context> put here the context</Context>
            then you can execute the action on a page process
            • 3. Re: Run an ODI Scenario from APEX
              I used the code from Jörg Lang to invoke from a PL SQL block and works very good


              req_text VARCHAR2(4000) := '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:odi="xmlns.oracle.com/odi/OdiInvoke/">

              req utl_http.req;
              res utl_http.resp;
              res_text VARCHAR2(32767);


              req := utl_http.begin_request('http://localhost:20910/oraclediagent/OdiInvoke?wsdl',
              utl_http.set_header(req, 'Content-Type', 'text/xml');
              utl_http.set_header(req, 'Content-Length', length(req_text));
              utl_http.set_header(req, 'SOAPAction', 'invokeStartScen');

              utl_http.write_text(req, req_text);

              res := utl_http.get_response(req);
              utl_http.read_text(res, res_text);