3 Replies Latest reply: Jan 3, 2013 1:16 PM by user536927-Oracle RSS

    listWebServices does not let me store the result in a variable

    907894
      listWebServices() outputs the result to the console & works fine.
      I want to be able to store the result in a python / jython variable ,so that I can later iterate through the list & call
      setWebServiceConfiguration on each of the web services.

      wsList = listWebServices() # wsList is empty

      I can probably redirect the output to a file & then read the file.

      But is there a better option ?
        • 1. Re: listWebServices does not let me store the result in a variable
          Kalyan Pasupuleti-Oracle
          Hi,

          Hope this link will deftly work for you.

          http://docs.oracle.com/cd/E15523_01/web.1111/b32511/getting_started.htm#BABDJHJE


          Regards,
          Kal
          • 2. Re: listWebServices does not let me store the result in a variable
            murali veligeti - oracle
            Hi,

            You can redirect the output of WLST to outfile.

            To start and stop redirecting WLST output to a file, enter:

            redirect(outputFile,[toStdOut])
            stopRedirect()

            You must specify the pathname of the file to which you want to redirect WLST output. You can also optionally specify whether you want WLST output to be sent to stdout; the toStdOut argument defaults to true.

            For example, to redirect WLST output to the logs/wlst.log file in the current directory and disable output from being sent to stdout, enter the following command:

            wls:/mydomain/serverConfig> redirect('./logs/wlst.log', 'false')

            Thanks & Regards,
            Murali.
            ===========
            • 3. Re: listWebServices does not let me store the result in a variable
              user536927-Oracle
              For some reason I do not see the listWebServices output redirected to file, only wlst header shows up


              Here is the excerpt of the py file and out file

              ============py=================
              adminUrl ="t3://slcaf993.us.oracle.com:9401"
              adminUser = "faadmin"
              adminPassword = "Fusionfa1CaDev"
              connect(adminUser,adminPassword,adminUrl);
              redirect('./wlst.log','false');
              listWebServices(detail=true);
              stopRedirect();
              ===============================

              =========== vi wlst.log=================
              Location changed to domainRuntime tree. This is a read-only tree with DomainMBean as the root.
              For more help, use help(domainRuntime)


              WLST output will no longer be redirected to ./wlst.log.
              ==============================

              Am I missing something here ?

              Edited by: user536927 on Jan 3, 2013 11:16 AM