Oracle Service Bus 11g: listing projects and services with WLST – part 1

For automating and repetitive purposes, as well for uniformity it’s always good to have some scripting. Especially when you want to do automated monitoring, and you don’t have a monitoring system such as Oracle EM GridControl, you can use the WebLogic tooling to do it for you. A tool, based on python and jython is WLST, in fact a JMX interface to access the MBean Domain structure within WebLogic, and in this case especially Oracle Service Bus.

My end goal is to monitor statistics en online endpoints of proy and business services, but first I issued to list my projects, business and proxy services.

The approach is:

– A WLST script to list Projects, Business and  Proxy Services

– A WLST script that frequently monitors these services on statistics, pipeline and SLA alerts

(if configured)

In this blog I will describe the listing, all done on a linux system. To start the script, execute:

java weblogic.WLST

For this you must have set your server’s CLASSPATH by running

Here are the various components of the script:

# Set some constants

import socket
localhost = socket.gethostname()
import os
domain = os.getenv('WL_DOMAIN')
domain_dir= os.getenv('WL_DOMAIN_DIR')
mwHome = os.getenv('MW_HOME')
print mwHome
url = 't3://' + localhost + ':<>'
print url

This section specifies some basics like connecting to the domain and setting some operating system variables like MW_HOME, WL_DOMAIN_DIR and so on. These settings need to be set on the O/S as well, like:

export MW_HOME=<path of your middleware home>

A good thing is to set these in you local users profile ( .profile or .bash_profile). I try to keep the script as generic as possible, by using special python functions like socket.gethostname()

Next part, the login section and I had to import some interfaces:

print “Lijst Proxy en Business services in ” + domain

connect(username, password,url)

from import ALSBConfigurationMBean
from com.bea.wli.config import Ref
from java.lang import String
from com.bea.wli.config import Ref
from import Refs
from import CommonServiceConfigurationMBean
from import SessionManagementMBean
from import ProxyServiceConfigurationMBean
from com.bea.wli.monitoring import StatisticType
from com.bea.wli.monitoring import ServiceDomainMBean
from com.bea.wli.monitoring import ServiceResourceStatistic
from com.bea.wli.monitoring import StatisticValue
from com.bea.wli.monitoring import ResourceType

Two important MBeans that must be used are OSB(ALSB) specific MBeans:

  • ALSBConfigurationMBean for managing an manipulating resources in your OSB Domain
  • ServiceDomainMBean for monitoring statistics for service

Next section is to list the Projects

As reference typeID you have to choose PROJECT_REF.


In the following sections I listed the proxy and business services in my Domain. See the code:

I used the findService to do a complete search within the configuration MBean. See listed Proxy and Business Services.

This is the way to do this. In part 2 (later on) I will describe the statistics monitoring.


Started in pharmacy, Michel made the change to IT in 1996, on a UNIX TTY terminal based computer and the MUMPS language. These days he is an Oracle Fusion Middleware Architect at Qualogy, as member of the Exalogic Squad team, with focus on technical infrastructure, Serverside solutions, installing, administering, configuring the Oracle Fusion Middleware stack. He started in 2000 as a support analyst for a big bank with BEA Tuxedo 6.5 and WebLogic 6. His experience is from integrations at telco´s. He now works mainly with Oracle WebLogic 11g and 12c, plus releases with practically all Oracle products running on top of it. In 2012 he became an Oracle ACE and wrote 2 books about WebLogic: This blog is also being published at: thanks to Jürgen Kress

79 Reacties op Oracle Service Bus 11g: listing projects and services with WLST – part 1

  1. Ranga schreef:

    Hi Michel,
    This is very useful script.
    Can you please send me the code?

  2. Pradip Gupta schreef:


    Thanks for sharing the useful script. I would also like to have the code. and also waiting for your next steps ..

    Thanks again



  3. Nazeer Ballim schreef:

    Hi Michel,

    This would come in handy in out production environment, would really appreciate the source. Thumbs up to your efforts


  4. Xander van Rooijen schreef:


    Which benefits do you get from doing it this way, rather then using the OSB / ALSB dashboard functionality? Considering alerting, monitoring etc is enabled on all services?

    With regards,

    • Hi Xander

      This is a beginscript which I will extend with statistics. Using just the console is not a bad option, but in a huge environment with massive services and a bulkload of messages, the console is not sufficient for pro-active monitoring. Either you use an out of the box product like OEM GridControl or you use scripting with email notifications

      kind regards


      • Xander van Rooijen schreef:


        Today i wanted to check which proxies in OSB where enabled and which were disabled. With that in mind, i thought about this blog and thought your script could help with this.

        Could you share the used script?

        Thanks in advance.

        With regards,

      • Praveen schreef:

        Hi Michel,

        Since you mentioned we can use OEM 11g for such monitoring let me ask you something on OEM.
        Currently we are using OEM 12c and we are newbies to OEM.
        Please let me know how can we proactively monitor such functionality voa OEM.
        Please note that we are just one of the users of OEM and we dont have super user access to OEM 12c.


        • Hi Praveen

          There are many ways to do monitoring.
          For OEM12c, fisrst thing is to have set basic things like an agent running on you OSB hosts, middleware management pack enabled for your OSB domain on OEM12c

          Important then is to monitoring basic things like:
          Are my server instances up
          How is CPU/Memory doing
          How are JVM instances doing

          Deeper dive into OSB leads you to the items you also monitor without OEM12c like
          Pipeline and SLA Alerts
          Service Metrics like min max response, operation metrics etc etc

          And apply al these into a monitoring template including watches and notifications.
          If you are just user in OME12c, you should do this together with you OEM admin or get the permission to do this for you OSB domain ( it doesn’t require super user access, just a good and clear thought of what permissions should be given and what not.

          Anyway, if you need more help, please contact me via our company, and we can work it out together.

          Kind regards


  5. abhay kumar schreef:

    This would be very helpful in monitoring the services. Great work. Please send the code.

  6. Rajan Arkenbout schreef:

    Very interesting stuff! Would love to see the code complete, Great Effort!


  7. Dan Dobrin schreef:

    I’d like to see the code, thanks in advance.

  8. kavin schreef:

    nice work. please send me the code.

  9. Igshaan schreef:

    Excellent Read, Please share the code ,Great Work!

  10. Hemamalini schreef:

    would like to see the code… thanks!!

  11. Mauricio schreef:

    Thanks for sharing the useful script. I would also like to have the code. Would love to see the code complete.
    Thanks again

  12. Pierluigi schreef:

    thanks a ton, Michel, thanks to you I managed to put together this JSP

    to display all resources in a OSB server…

    Incidentally if you could share the code to display also the performance statistics, that would be fabulous – my email is publicpierre at gmail dot com


  13. Igshaan schreef:

    Excellent Read,Great Work!
    Can you please send me the code?

  14. Mette Stephansen schreef:

    Hello !

    I’m just beginning on monitoring WLS and OSB. We need to script the monitoring of queues, jdsc connections and services/aplications.

    Could you mail me the code from the above examples? They would be great to work from.


  15. Very good schreef:

    Could you send me the code?

    Thk in advance

  16. Khang Nguyen schreef:

    It is very useful script, could you send me the source code?


  17. Ran schreef:

    Hi Michael,
    I am looking to get more OSB configuration such as following using API programming, where can i get more details?

    Proxy name
    Proxy State
    EndPoint URI
    EndPoint Properties
    Dispatch Policy

    Similarly business service and MQ information, can u help?


  18. Rao Vidadala schreef:

    Hello Michel,
    Very nice article.. Could you please send me the code. Thanks very much..

    Rao Vidadala

  19. Jaisankar schreef:

    Thanks for sharing the nice article. Please let us have the code for SLA alerts.

  20. Franco schreef:

    Hi Michel,
    Great blog, and excellent post. It really seems like a great tool for large environments. Could you please share the code with us?

  21. Jonas schreef:

    Can you please share the code with me?

  22. Zeljka schreef:

    Hi, can you please send me the code?
    Thank you

  23. Rajan Arkenbout schreef:

    Excellent example, would be nice to share the code!

  24. Enio machado schreef:

    Hi Michel,
    Can you please share the code with me?

    Thank you,

  25. Jerczey schreef:

    Hello Michel

    Very nice example! Can you please share the code with me ?

    Thank you for your work, keep it up!

  26. Praful schreef:

    Hi Michel,

    Excellent work and very useful.
    Can you please share the code.


  27. Norberto Enomoto schreef:


    Nice script.
    Can you please share the code.


    Norberto Enomoto

  28. Hi Michel schreef:

    This script will do wonders for my team. Can I please get the script as well.


  29. Roberto schreef:

    Very useful script!
    Cna you please share the code?


  30. Amit schreef:

    Very useful script!

    Can you please share the code? Also do you know if you can use wlst to create resource in a project?

  31. Fabrício Soares schreef:

    Hi Michael can you please share the code?
    This is very useful to me.

    Thnaks in advanced.
    Fabrício Soares

  32. Salvatore Di Salvo schreef:

    Excellent work !
    Can you please share the code ?


  33. Fr schreef:

    A Great Work.
    Can you please send me the code ?

  34. Vishal schreef:

    I very much like this article. I need wslt scripts for listing all the deployed composites and for monitoring statistics.
    Can you please share at my email id:


  35. ck schreef:

    Nice work!!, please share the code

  36. Arnab schreef:

    Great work Michel, it will be really helpful if you can send me the code. Do you also have the java code for doing the same? One of my other requirement is to find the business services being used by a specific proxy service.i,e something like the following : loop through and print all the proxy services in an OSB environment and list out the business services being invoked by a specific proxy service. Can this be also achieved through a wlst script or jmx?

    Thanks In Advance

  37. Kalyan schreef:


    Can you send me the script to find the all the proxy and business service


  38. Kalyan schreef:


    Thanks in advance


  39. Julio Cesar Rodriguez Ibague schreef:

    Hi Michel.

    Excellent information .. Might you give me the code, also if you have information or procedure to make changes or deployments and osb same operations, but soa.
    Thank you very much, that good information.

  40. Indraneel schreef:

    Hi Michel,
    Thanks a lot for the informative articles. It’s a delight to read those stuff. Needless to say I would love to have the script! I will appreciate if you can email it to me.

  41. Enio schreef:

    Hi Michel,
    is possible list in the script teh Endpoint URI from the BS and PS?

    Thank you,

  42. Enio schreef:

    Hi Michel,
    i found how to do it…

    Thank you.

  43. Christian schreef:

    Hi, good article.

    I need to know that is possible to get de endpoint uri’s form Proxy Services and Business Service.

    If you can help me with that, i would appreciate


  44. Wayne Highland schreef:

    Hi Michel,

    Very interested in your article, would be great if I could get a copy of the script you use.

    Thanks again

  45. Andre schreef:

    Very nice article, could you send the source code?

  46. Ganesh umar schreef:

    Hi Michel,

    Good to see How an analyst grown dso big, I am also trying to follow you :)

    I am trying to develop a Java Code to extract complete Path for any PS or BS.

    Can you please suggest How I can do that? Also can you please send me complete code for example illustrated in this thread.

    A big thanks in advance.

  47. manu schreef:

    I am very new to OSB and this blog is really very helpful. Could you please share wslt source to deploy OSB Jar and ALSB plan(config plan) recursively.

  48. Victor Perez schreef:

    Hi, good day and thank you very much for your input. Might I send you the code, please.

  49. Brandon schreef:

    This is great! Can you send me the code?

    Thank you

  50. Dilip schreef:

    Hi Michel

    This is a great article & very useful for production support.
    Can you please share code with me.

  51. Najam schreef:

    Nice script , please send me the script and the code


  52. sreeni schreef:

    can you please send me the code


  53. sreeni schreef:


    can you please send entire code and script for list of proxy and business services in osb.


  54. Nikhil schreef:

    This would be very helpful in monitoring the services. Great work. Please send the code.

  55. Imran schreef:

    Hi Michel,

    Worked with you at Belgacom the time you were leaving. Very good post, do you have WLST script to change the endpoints uris (e.g. DEV env to TEST env host and port) in the service bus buisness service or proxy service? Please share this script with me and the script to change the endpoint uris.


    • Hi Imran
      Yes, I remember. At this moment I don not have such a script but I’m working on a set of scripts which can do the work you also do in the console, such as monitoring, change endpoints, dis and enable services. As soon as I have it I will post it.

      Kind regards

  56. Venkat schreef:

    Excellent, this is what I am searching for.Could you plese share me the code,also if you have a script to enable/disable all proxy services at a time request to Kindly share.
    Thanks in advance.

  57. Krishna schreef:


    Excellent work. Can you please send the code?

    Thank you,

  58. Kumar schreef:

    Michchel ,

    Great Work . Could you please share the code ? this is exactly what I am looking for.


  59. suneetha schreef:


    Please send me the code to my email id.


  60. Mark schreef:

    Great work Michel, this will be very useful – please can you share the code with me ?

  61. Mark schreef:

    Hi Michel,

    I’m looking to implement something similar however I need to retrieve the file transport configuration for proxy services like:

    File Mask
    Managed Server
    Polling Interval
    Read Limit

    Any ideas where these are located?

    • Hi Mark
      You can use for that, which contains all kinds of interfaces
      In the ServiceDomainMBean Interface you can get look for managed servers (getServerNames()) but for monitoring info you better can make use of the standard WLS interfaces.

      kind regards


  62. Mark schreef:

    Thanks Michel – I’m still struggling to retrieve these configuration details.
    Can you provide an example of how this is done?

  63. Mark schreef:

    The struggle is when retrieving transport configuration properties like polling interval, read limit etc. I can’t locate these anywhere inside If you can create an simple example that would be great :)

  64. Ram schreef:

    Hi Michel,

    Great post :). Could you pls share the scripts of and to my email.


  65. Narayanan schreef:

    Great Post, can you please share the code.


  66. Subash schreef:

    Hi Michel,

    Did you get to chance to see how it is to run on Soa suite 12c? I am not able to run the py script in wlst. I started from the $SOA_HOME/wls_server/common/bin/wlst.cmd and have set the required jar files sbkernal and configfwk jar files but still I get the error as

    importError:no module named wli

    Coudl you please explain how to create a session make the changes and activate the changes in the OSB 12c proxy service (like end point change, policy selection from owsm etc,.)

    Thanks for the great post

  67. Bharath schreef:


    Can you please share the code ?


Geef een reactie

Het e-mailadres wordt niet gepubliceerd. Verplichte velden zijn gemarkeerd met *


Hebt u vragen of suggesties?


De Bruyn Kopsstraat 9

2288EC Rijswijk (ZH)

The Netherlands

+31.(0)70 319 5000

  • Blog

  • Tags

  • @qualogy_news

  • @qresources

  • Reacties

  • Blijf in contact

    +31.(0)70 319 5000