API's to configure monitoring in ALSB

Greetings
I was wondering if there is a way one could build an external application which could configure monitoring rules for proxy services in ALSB 2.5.
Thanks
Ananth

The reason why the need for external configuration of certain parameters (like logging config) arises is when an enterprise has 100's of proxy services and ALL of them adhere to a standard policy.
I understand that none of the ESB's support MASS UPDATE of policy. But is there any API to access and update the configuration?
Thanks

Similar Messages

  • NWA is not opening in PI 7.1 from Configuration & Monitoring tab

    Hi All,
    When i try opening NWA from Configuration & Monitoring tab, it is not giving me proper results as i do from /nwa in generic scenario. I'm getting message as "No data available to the system selector".
    I'm using PI 7.1.
    Do i need to configure anything?

    Prateek,
    As per your information, i have started applying note # 1160261 & while it's application, stuck up for 2nd step-"Note 1226536 - WSIL service gives wrong endpointURL", basically here i would like to know, should i be first doing Template installation step -" Configure NWA for Double Stack System"?
    Please any one of you have applied all the steps in Configuration wizard with respect to NWA & NWAPI, then please help me with any of it's documents.

  • Configuring Monitoring reports

    Hi all,
    im trying to configure Monitoring report,but stuck at the part where i should associate Monitoring report With a Mirror database.
    I have used this guide :
    https://technet.microsoft.com/en-us/library/jj945624.aspx
    Im now at the part where i click on CDRDB,but when i click on it i only see XML view and dont have the "GUI" Interface to add Connection string.
    My account has Admin rights for SQL database and also member of RTC Admin Group.
    Why can i not see it in edit mode,which permission am i missing?
    Thanks!
    Please mark as helpful if you find my contribution useful or as an answer if it does answer your question. That will encourage me - and others - to take time out to help you. Thank you! Off2work

    Ok,so i figured it out and the reason was because i used wrong url.
    correct one should be http://localhost/Reports_RTC and NOT
    http://localhost/Reportserver_RTC
    Please mark as helpful if you find my contribution useful or as an answer if it does answer your question. That will encourage me - and others - to take time out to help you. Thank you! Off2work

  • Grid Control Configure Monitor Username

    Hi,
    I dropped the standby and recreated it. Now i'm trying to add this to the OMS for monitoring. Host is success but when i try to add the standby database to OMS, the Monitor Username parameter is defaulting to dbsnmp and not allowing me change to sys so the sysdba can monitor the standby. How to change the deafult username parameter from 'dbsnmp' to 'sys'? I even tried to edit the targets.xml file on agent but everythin defaults when the agent is recycled? I can't give the 'dbsnmp' sysdba privileges since the database is in standby mode-mounted only.
    Thanks,
    Ash

    To monitor a target as sysdba do this:
    Go to targets and then select the databases tab and select your database (just put the green dot next to it, don't click on the database name link). At the the top/bottom of the targets page, hit the configure button.
    In this page, hit the drop down box first and select 'AS SYSDBA'
    Now you can edit the username.

  • Unable to configure monitor & report in Lync 2013

    We have SQL Server 2012 in our environment. I want to enable monitor report in Lync 2013. i have separate Lync sql instance.
    I am trying to configure new database in Reporting Service Configuration manager in report Server database Configuration wizard.
    while testing connection getting below error.
    could not connect to server:A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to
    allow remote connections.(provider:Named Pipes provider,error:40-could not open a connection to SQL Server)
    kindly help to resolve issue.

    In my opinion, if you have problem with your firewall, try disabling it and connect. If it doesn't work, means it could be your SQL configuration / enabling of TCP/IP problem.
    Check the below blog:
    http://blog.sqlauthority.com/2009/05/21/sql-server-fix-error-provider-named-pipes-provider-error-40-could-not-open-a-connection-to-sql-server-microsoft-sql-server-error/
    If you are able to connect to SQL Server by physically logging on to the server, but unable to connect from a client computer then execute the below to check the SPN.
    -- run this command to see if SPN is not found
    EXEC xp_readerrorlog 0,1,"could not register the Service Principal Name",Null
    If the SPN is not found setup and register an SPN. (https://msdn.microsoft.com/en-us/library/ms191153(v=sql.110).aspx#Manual)
    Tek-Nerd

  • BingAds API: Can we configure the same email id to get API access for multiple BingAds account ?

    Hi Eric,
    We help our customers to analyze their marketing performance. We have configured the email id e.g. [email protected] which has the API access to one of our customer BingAds Account. Now we are able to authenticate using Oath tokens and able to access customer
    data using the given developer token.
    Now i need your help to clarify the below.
    1) Can i have the access to my other customer BingAds account using the same email Id i.e. [email protected] or Do i need have the two different users/email ids to access different BingAds account?
    2) If it is possible to configure the same emailId/usert for different BingAds accounts , then i belive my Oauth tokens will be same in this case, but how about my devloper token , do i need to maintain two seperate developer tokens?
    3) If its not possible to use the same email id for two BingAds account api access, is there any alternate way to have the common oauth authentication for  both the accounts?
    Thanks in advance.
    Regards,
    Sreekanth.
    Sreekanth A

    Hi Eric,
    I have got to know from the BingAds support that i have to switch my account to Agency type to access multiple accounts data over API. But they only assist on this for Microsoft Managed BingAds account, but it can not access the data from BingAds account which
    is managed by Yahoo.
    If i need to create Agency type BingAds account which can have the API access to multiple BingAds accounts managed by Yahoo, what may be the process?
    Can you please guide me on this? as of now i got the news is that to contact the Yahoo Account managers, if you have any more information on this , please let me know.
    Thanks,
    Sreekanth.
    Sreekanth A

  • MAX Programming API / NI System Configuration Functions

    Hi all,
    I recently came across this given tasks that I need to use C or Python language to wraped one of the remote NI chasiss we own in the company.
    We are a big Python house, we used a lot of Python ctypes library to talk to the C windows DLL to control / talk to the NI devices.
    Right now I am able to use Python ctypes to talk to the remote chasiss by using NI's DAQmx driver (nicaiu.dll) once the remote chasiss is added and configured in NI MAX utility.
    I am wondering if there is a way to programatically control the adding / configurating remote chasiss so that we don't need to manually setup using NI MAX utility.
    I've been searched around and came across with some possible solutions in C, namely that NI System Configuration API for LabWindows / CVI has a dll / lib that can be called to intialize / search and add the devices.
    I believe this library is called "NISysCfgxxxxxx, where xxxx are the different function names. I've also came arcoss some reference on how to call these functions in C. For example:
    NISysCfgInitializeSession
    NISysCfgStatus NISysCfgInitializeSession( const char targetName[], const char username[], const char password[], NISysCfgLocale language, NISysCfgBool forcePropertyRefresh, unsigned int connectTimeoutMsec, NISysCfgEnumExpertHandle * expertEnumHandle, NISysCfgSessionHandle * sessionHandle ); 
    Some example codes shows in C, we need to include "nisyscfg.h", in order to get the Struct / #define information for types like NISysCfgLocale, NISysCfgBool, NISysCfgEnumExpertHandle, NISysCfgSessionHandle...
    However I cannot seems to find this header files anywhere from my installed drives / software... I believe it would be extremely helpful for me to get to read this header file so I can create a wrapper class / function in Python ctypes and utilize the nisyscfg library. Does anyone have any pointers on how to create this kind of wrapper or getting any reference information for this header file?
    Thanks in advance!
    -Charlie-

    Hi Charlie,
    I found nisyscfg.h in the Shared\CVI\Include folder. Likely this was installed when I installed LabWindows\CVI. It id part of our System Configuration driver. You can find that here:
    http://joule.ni.com/nidu/cds/view/p/id/3667/lang/en
    One thing to note is that this is only going to be supported when using the softwares listed, being LabVIEW, LabVIEW Real Time and LabWindows\CVI. Your options of creating a c type wrapper with python may be much more limited with these options.
    Regards,
    James W.
    Applications Engineer
    National Instruments

  • P6 API Install - RMI Configuration

    I am having problems getting the P6 API installed. Here's what does work:
    1) P6 itself and the Optional Client
    2) The API is deployed to Weblogic and is active
    3) Demoexport.cmd works
    Here's where things go wrong.
    I've written a simple java program to getDataBaseInstances and it errors with Connection Refused.
    I compared my setup with a working environment we have on another server and
    a) My test program works
    b) I see an RMI Network Channel is configured.
    Even though I see no instructions in the Install Guide to do so I configured an RMI Network Channel in my setup
    I now get RMIConnectionException: error during JRMP connection establishment; nested exception is: java.io.EOFException
    Question? Is there RMI, or indeed any other Weblogic, configuration that is needed but not mentioned in the Install Guide?
    Just in case it's relevant: P6 version 8.1, Weblogic 11gR1 all downloaded from the latest EPPM folder

    The issue was that startWeblogic.cmd needed to be edited and the java option primavera.bootstrap.home set
    Earlier versions of the install guide says to do this for weblogic but the 8.1 guide fails to mention this vital detail.
    Grrhh - maybe 60hrs wasted

  • Configure Monitoring of a MSMQ private queue Messages in Queue counter

    Hi
    I have a workgroup server that is not part of my local domain.
    I have contented the server to my local SCOM 2012 R2 server and it is working fine.
    My SCOM server has MSMQ 6.0 & 6.3  MP's installed.
    On the remote servers I have some MSMQ 6.0 private queues.
    When I am trying to monitor one counter in 1 queue , when the threshold is reached I am getting error message on al the queues.
    On the performance counter tab I have :
    Object: MSMQ Queue
    Counter : Messages In Queue
    Instance :[server name'\private$\error
    There were 1207 messages in this queue .
    I Got about 30 messages and error on all queues.
    What did I do wrong ?
    Itamar
    Itamar

    Hi
    This is the alert email I got :
    Alert: Notification Queue
    Source: maasw1\private$\maas.backend.scheduler.timeoutsdispatcher
    Path: MAASW1.xxx.com
    Last modified by: System
    Last modified time: 2/18/2014 2:45:49 PM Alert description: Instance Computer Queues
    Object MSMQ Queue
    Counter Messages in Queue
    Has a value 19
    At time 2014-02-18T14:45:35.0000000+02:00
    I did not place a monitor on this queue but on 2 other queues.
    one with threshold of 500 and on with 1 .
    I have made some change in the monitor and will test it now.
    Thanks
    Itamar 
    Itamar

  • Forms Configuration Monitoring

    Using OAS 9.0.4.2 Forms/Reports. I notice with EM I can now view user session information for active Forms sessions. Is a history of this information kept in a logfile somewhere or can I enable it to log somewhere? I would like to analyze specifically what form configurations are being used and how often. None of the OC4J_BI_Forms logs contain the information and I used LogLoader to search for some form configuration names and didn't have any hits.

    Those em_xxxxx.rti files are created when em_mode=1 & there should be one for every connected session.
    It seems like some get left behind when there are crashes or abnormal disconnections, but that his a hypothesis about why they get left behind. I'm not certain.
    When a user logs out of the application, the rti file is deleted. You could get a pretty good sampling of data by writing a script that parses this using grep & writes the data to a log file. You could run it as a cron job to collect the data regularly, but it is possible that users are logged on for less than a minute & you don't collect the info from the file before it is deleted.
    I have a simple script that reads thorugh the rti files and shows who the connected users are. See example. Not helpful for your situation, but may be helpful for you in creating your own script.
    Cordially,
    Steve
    NUM_USERS=0
    DATE_STARTED=`date`
    echo ""
    echo "MAXe user sessions as of "$DATE_STARTED" on `hostname`"
    echo ""
    for MAXE_USER in `ps -A | grep frmweb | cut -c0-6 | sed 's/ //'`
    do
    echo $MAXE_USER
    let "NUM_USERS = $NUM_USERS + 1"
    EM_FILE="$ORACLE_HOME"/forms/em/em_"$MAXE_USER".rti
    cat $EM_FILE | grep -v "listener = " | grep -v "config = "
    echo ""
    done
    echo $NUM_USERS" users logged on as of "$DATE_STARTED"."
    echo ""

  • Updating an ALSB configuration using WLST

    I've been using the AquaLogic Service Bus Deployment API (http://e-docs.bea.com/alsb/docs21/deploy/config_appx.html) to export and import an ALSB configuration from my development environment to the test environment. When the system is going to production I want the WLST-scripts to be a part of the installation scripts.
    It looks like the import features of ALSB is designed to append and overwrite the imported configuration. Configuration elements that does not exist in the imported configuration will not be deleted from the target configuration. This will, over time, cause the production environment to end up as an enormous garbage can if nobody goes in and cleans it from time to time.
    We have as requirements that all installation must be done automatically (untouched by humans), so my question is:
    <li>How can I ensure consistency between the configuration I deliver and the production environment?
    </li>
    The most obvious place to look for such an opportunity should be in the import utility. But, as far as I can see, there is no <i>replace configuration</i> option available for the DeploymentMBean.
    BEA develops MBeans for the most of the service components. So it should also exist MBeans that can be used to programmatically configure ALSB without using the DeploymentMBean. So, my second question is:
    <li>Does anyone know of an ALSB MBean that is capable to remove a project from the configuration?</li>

    Hi Helge,
    There is indeed an mbean to delete projects, however this mbean and its api is not publicly supported. In other words the api may change or be removed (in favor of another one) in the next release. There are plans to expose a slight variation of this api in the next release. If you cannot wait until then you can use the non-public api with the caveat that it may change, and use it at your own risk. You may need to recompile or rewrite your source code.
    The non-public api is:
    ALSBConfigMBean.deleteProject(String projectName)
    obtaining and using ALSBConfigMBean is similar to the usage of the public ALSBConfigurationMBean. You can obtain the name and the type of this mbean using ALSBConfigMBean.NAME|TYPE.

  • How to configure 2 external monitors with X1 Carbon

    I have a brand new X1 Carbon (Generation 1 3444-CYU), and I also have the docking station.  My intention is to be able to have the laptop cover closed, and to use the power switch on the top of the docking station to start (apply power to) the laptop, and to have the output be driven to two DVI monitors.
    At this point, I'm able to have the laptp drive the main screen (part of the laptop) and the two external monitors, but I cannot seem to figure out how to use the docking station to "start/boot" the PC, and to have the bootup sequence, and other subsequent display presented on the two DVI screens only.
    As I've been looking through the knowledge base, I'm surprised that there are not simply a series of articles that describe the various options for configuring monitors, so I'm forced to post this request.  Can someone help?
    thanks

    I see this is an old post, but I figured I'd respond in case someone else is having the same problem.
    There is a setting in the BIOS where you can have the X1 power on automatically when you plug it into the dock. I believe the setting is called something to the affect of "Power On When Connected to A/C." This solves the problem you and describing and I have been using with successfully with a dual monitor set up.

  • CCMS Alert Monitor (edit monitor-configuration.xml. ?)

    Hi Friends
    I'm trying to change the default polling time for the CCMS Alert Monitor, 5 minutes instead of 30 minutes.
    In http://help.sap.com/saphelp_nwpi71/helpdata/en/e5/5d1741b393f26fe10000000a1550b0/content.htm you can read:
    Accuracy
    The default polling period for the monitor is 30 minutes. If you want to have shorter polling periods, you can change them in the SAP NetWeaver Administrator as follows:
    1. Choose Availability and Performance Management ® Resource Monitoring ® Java System Reports (alias: /nwa/java-sys-reports).
    2. Select an arbitrary Number of errors entry in the monitoring tree of the Adapter Engine (leaf node).
    3. Choose Configuration in the right-hand pane.
    4. Choose Edit in the dialog box that appears.
    5. Change the polling period to 5 minutes, for instance.
    6. Choose Save and wait until saving is finished (be patient, since this may take a while).
    7. Choose Configuration Management ® Infrastructure Management ® Java Configuration Browser.
    8. Choose apps ® sap.com ® com.sap.aii.af.app ® Monitoring Configurator ® monitor-configuration.xml.
    9. In the xml file, change the polled-by-template period to the same value as above, for example, 5 minutes.
    10. Save the modified xml file.
    11. Choose Operations Management ® Infrastructure Management ® Start & Stop ® Java EE Services to restart the Monitoring service to apply the changes.
    But in step 9, the xml file I've found in my PI 7.1 (SP6) is this:
    <monitor-configuration>
    <monitor-semantics />
    <monitor-tree />
    </monitor-configuration>
    Also, there is no way to modify that file, you can only display it or download it.
    can anyone tell me how to edit the file.
    regards
    raja

    Hi Raja,
    This is the same as doing the following:
    You can locate the monitor-configuration.xml file in the SDA com.sap.aii.af.app.sda (inside META-INF folder). You can find this SDA in the install directory of PI installation. In this XML file please locate and edit the following tag:
    <template-info template-name="SAP_XIJ2EE_RCRDS">
                            <polled-by-template period="30" unit="MINUTE">
                                <generating-resource
                                    name="com.sap.aii.utilxi.rtcheck.mx.standard.XIJ2EEComponentMBean" type="APPLICATION"/>
                                <template-attribute-mapping>
                                    <invoked-resource-method name="getMonitoringRecords"/>
                                </template-attribute-mapping>
                            </polled-by-template>
                        </template-info>
    Change the above to the following *************
    <template-info template-name="SAP_XIJ2EE_RCRDS">
                            <polled-by-template period="5" unit="MINUTE">
                                <generating-resource
                                    name="com.sap.aii.utilxi.rtcheck.mx.standard.XIJ2EEComponentMBean" type="APPLICATION"/>
                                <template-attribute-mapping>
                                    <invoked-resource-method name="getMonitoringRecords"/>
                                </template-attribute-mapping>
                            </polled-by-template>
                        </template-info>
    The main change is the polled-by-template value from 30 mins to 5 mins as per your req ******
    Construct back the SDA (you can search SDN for that) with this edited XML and then redeploy this SDA with the help of JSPM tool.
    This will re-start the PI Server for the changes to come into effect.
    I hope this helps.
    PS: You can consult your BASIS consultant to locate this sda and re-deploy it on PI Server.
    Regards, Gaurav.

  • Configurator API

    Hi All,
    I am working on configurator developer, I need to pass additional values in the initialization message while the configurator is invoked in the iStore Application and have to pre-select the addional values that are been passed by iStore in the configurator session for that particular service configuration.
    How can I pass the additional messages to initialization message please any one help me on this.
    Thanks advance,
    Gopi

    Duplicate thread (Please post only once).
    Configurator API's
    Re: Configurator API's

  • OSB - ALSB / WLST / Security / add entry with WLST in  Access Control

    Hello,
    I try to reproduce with WLST script the input from the consol to declare user on Access Control proxy (security).
    sbconsol->$Proxy Service->Security->General Confiruration->Access Control->Transport Access Control->Add Conditions
    * First implementation without success with the com.bea.wli.sb.security.management.configuration.ServiceSecurityConfigurationMBean : accessControlSecurity1()
    * Second try with the service definition of the proxy service but cannot parse with Xpath accessControl Security2()
    any idee ???
    test case :
    prerequisit
    create an ALSB domain 10.3 (admin one with username='weblogic' password='weblogic' url='t3://localhost:7001') and create a proxy service on the default project
    conf/setEnv.cmd
    @CLS
    @echo ON
    @set BEA_HOME=D:\PRODUCT\MIDDLEWARE\SOA\OSB_10.3
    @set WL_HOME=%BEA_HOME%\wlserver_10.3
    @set OSB_HOME=%BEA_HOME%\osb_10.3
    @set SCRIPTING_HOME=E:\PROJETS\RECURANT\EDF\linky\WLST\WORKING\Security
    @set OSB_LIB=%OSB_HOME%/lib/sb-kernel-api.jar;%BEA_HOME%/modules/com.bea.alsb.statistics_1.0.1.0.jar;%OSB_HOME%/lib/sb-kernel-resources.jar;%OSB_HOME%/lib/sb-kernel-common.jar;%OSB_HOME%/lib/sb-kernel-impl.jar;%OSB_HOME%\lib\sb-security.jar;%OSB_HOME%/modules/com.bea.common.configfwk_1.3.0.0.jar;%BEA_HOME%/modules/com.bea.common.configfwk_1.2.0.0.jar;%BEA_HOME%/modules/com.bea.common.configfwk_1.2.1.0.jar;%OSB_HOME%/lib/modules/com.bea.alsb.resources.archive.jar;
    @set TOOL_LIB=%SCRIPTING_HOME%\lib\log4j-1.2.15.jar;%SCRIPTING_HOME%\lib\jsch-0.1.43.jar;%SCRIPTING_HOME%\lib\db2jcc.jar
    @set CLASSPATH=%OSB_LIB%;%TOOL_LIB%;%CLASSPATH%
    @set CLASSPATH=%SCRIPTING_HOME%\lib\db2jcc.jar;%TOOL_LIB%;%CLASSPATH%
    @set MODULE_LIB=%SCRIPTING_HOME%\lib
    @call %WL_HOME%\server\bin\setWLSEnv.cmd > nul 2<&1
    launch.cmd
    @CLS
    @echo OFF
    @SETLOCAL
    @call "conf\setEnv.cmd" > nul 2<&1
    set PWD=%~dp0
    %JAVA_HOME%\bin\java -Dmodule.lib=%MODULE_LIB% weblogic.WLST -skipWLSModuleScanning lib/security.py
    lib/security.py
    from com.bea.wli.monitoring import StatisticType
    from java.util import HashMap
    from java.util import HashSet
    from java.util import ArrayList
    from java.util import Collections
    from java.io import FileInputStream
    from java.io import FileOutputStream
    from java.lang import String
    from java.lang import Boolean
    from com.bea.wli.sb.util import EnvValueTypes
    from com.bea.wli.config.env import EnvValueQuery;
    from com.bea.wli.config import Ref
    from com.bea.wli.config.customization import Customization
    from com.bea.wli.config.customization import EnvValueCustomization
    from com.bea.wli.config.customization import FindAndReplaceCustomization
    from com.bea.wli.sb.management.configuration import SessionManagementMBean
    from com.bea.wli.sb.management.configuration import ALSBConfigurationMBean
    from com.bea.wli.sb.management.query import BusinessServiceQuery
    from com.bea.wli.sb.management.query import ProxyServiceQuery
    from com.bea.wli.sb.management.configuration import ServiceConfigurationMBean
    import os
    # before, create an ALSB domain 10.3 with a proxy service in the default project and add an Acces Control Policy in the consol
    # sbconsol->Project Explorer->default->${proxy service}->Security->Access Control->Create Session->Add Conditions->User->USR_1->Add
    # when we try to modify the Acces Control Policy of the proxy service with the ServiceSecurityConfigurationMBean
    def accessControlSecurity1( domain_name ):
              # connection
              print "\n\n\n***********************************************************************************************"
              connect( 'weblogic', 'weblogic', 't3://localhost:7001')
              domainRuntime()
              # create a session
              sessionName = String("SessionScript"+Long(System.currentTimeMillis()).toString())
              SessionMBean = findService( SessionManagementMBean.NAME ,SessionManagementMBean.TYPE)
              SessionMBean.createSession(sessionName)
              # get the ServiceSecurityConfigurationMBean
              serviceSecurityConfigurationMBean = findService(String("ServiceSecurityConfiguration.").concat(sessionName), "com.bea.wli.sb.security.management.configuration.ServiceSecurityConfigurationMBean")
              # get the XACMLAuthorizer
              working_directory=pwd()
              serverConfig()
              xacmlAuthorizer = cd('/SecurityConfiguration/%s/Realms/myrealm/Authorizers/XACMLAuthorizer' % domain_name )
              cd(working_directory)
              domainRuntime()
              # get service ref
              ConfigurationMBean = findService(String("ALSBConfiguration.").concat(sessionName), "com.bea.wli.sb.management.configuration.ALSBConfigurationMBean")
              bsQuery = ProxyServiceQuery()
              bsQuery.setPath("default/*")
              refs = ConfigurationMBean.getRefs(bsQuery)
              for ref in refs:
                   print 'ref=%s'%ref               
                   # use the security Mbean to add : USER_A,USER_B,USER_C to the policy
                   policyHolder = serviceSecurityConfigurationMBean.newAccessControlPolicyHolderInstance(xacmlAuthorizer)
                   policyHolder.setPolicyExpression("Usr(USER_A,USER_B,USER_C)")     
                   policyScope = serviceSecurityConfigurationMBean.newDefaultMessagePolicyScope(ref)
                   serviceSecurityConfigurationMBean.setAccessControlPolicy(policyScope,policyHolder)
                   # print the service definition
                   servConfMBean = findService( "%s.%s" % (ServiceConfigurationMBean.NAME, sessionName), ServiceConfigurationMBean.TYPE)
                   serviceDefinition = servConfMBean.getServiceDefinition(ref)
                   print serviceDefinition
                   # we can see the security entry in the service definition has follow
                   # <xml-fragment xmlns:ser="http://www.bea.com/wli/sb/services" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tran="http://www.bea.com/wli/sb/transports" xmlns:env="http://www.bea.com/wli/config/env">
                   # <ser:coreEntry isProxy="true" isEnabled="true" isAutoPublish="false">
                   # <ser:description/>
                   # <ser:security>
                   # <con:access-control-policies xmlns:con="http://www.bea.com/wli/sb/services/security/config">
                   # <con:message-level-policies>
                   # <con1:default-policy xsi:type="con:ProviderPolicyContainerType" xmlns:con="http://www.bea.com/wli/sb/security/accesscontrol/config" xmlns:con1="http://www.bea.com/wli/sb/services/security/config">
                   # <con:policy provider-id="XACMLAuthorizer">
                   # <con:policy-expression>Usr(USER_A,USER_B,USER_C)</con:policy-expression>
                   # </con:policy>
                   # </con1:default-policy>
                   # </con:message-level-policies>
                   # </con:access-control-policies>
                   # </ser:security>
              # but when we commit
              SessionMBean.activateSession(sessionName, "description for session activation")
              # we got the following exception
              # Unexpected error: com.bea.wli.config.session.SessionConflictException
              # No stack trace available.
              # Problem invoking WLST - Traceback (innermost last):
              # File "E:\PROJETS\RECURANT\EDF\linky\WLST\WORKING\Security\lib\security.py", line 246, in ?
              # File "E:\PROJETS\RECURANT\EDF\linky\WLST\WORKING\Security\lib\security.py", line 105, in accessControlSecurity1
              # com.bea.wli.config.session.SessionConflictException: Conflicts for session SessionScript1363339726764
              # [Non-Critical] Concurrent Modification Conflicts
              # NONE
              # [Critical] Resources with validation errors
              # 1 - ProxyService test/PS_TEST_bis CannotCommit
              # + CannotCommit [OSB Security:386836]Unnecessary proxy wide message access control policy found for service "test/PS_TEST_bis". Hint: The service is neither an active security
              # intermediary nor has custom authentication enabled. ServiceDiagnosticLocation[SECURITY_TAB]:DiagnosticLocation:<con:message-level-policies xmlns:ser="http://www.bea.com/wli/sb/services" xml
              # ns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tran="http://www.bea.com/wli/sb/transports" xmlns:env="http://www.bea.com/wli/config/env" xmlns:con="http://www.bea.com/wli/sb/services/security/config">
              # <con1:default-policy xsi:type="con:ProviderPolicyContainerType" xmlns:con="http://www.bea.com/wli/sb/security/accesscontrol/config" xmlns:con1="http://www.bea.com/wli/sb/services/security/
              # config">
              # <con:policy provider-id="XACMLAuthorizer">
              # <con:policy-expression>Usr(USER_A,USER_B,USER_C)</con:policy-expression>
              # </con:policy>
              # </con1:default-policy>
              # </con:message-level-policies>
              # [Info] Informational messages
              # NONE
              # at com.bea.wli.config.session.SessionManager.commitSessionUnlocked(SessionManager.java:358)
              # at com.bea.wli.config.session.SessionManager.commitSession(SessionManager.java:339)
              # at com.bea.wli.config.session.SessionManager.commitSession(SessionManager.java:297)
              # at com.bea.wli.config.session.SessionManager.commitSession(SessionManager.java:306)
              disconnect()                              
    # when we try to modify the Acces Control Policy of the proxy service whith the service XML definition
    def accessControlSecurity2( domain_name ):
              # connection
              print "\n\n\n***********************************************************************************************"
              connect( 'weblogic', 'weblogic', 't3://localhost:7001')
              domainRuntime()
              # create a session
              sessionName = String("SessionScript"+Long(System.currentTimeMillis()).toString())
              SessionMBean = findService( SessionManagementMBean.NAME ,SessionManagementMBean.TYPE)
              SessionMBean.createSession(sessionName)
              # get service ref
              ConfigurationMBean = findService(String("ALSBConfiguration.").concat(sessionName), "com.bea.wli.sb.management.configuration.ALSBConfigurationMBean")               
              bsQuery = ProxyServiceQuery()
              bsQuery.setPath("default/*")
              refs = ConfigurationMBean.getRefs(bsQuery)
              for ref in refs:
                   print 'ref=%s'%ref
                   servConfMBean = findService( "%s.%s" % (ServiceConfigurationMBean.NAME, sessionName), ServiceConfigurationMBean.TYPE)
                   serviceDefinition = servConfMBean.getServiceDefinition(ref)
                   # parsing the proxy definition
                   nsSer = "declare namespace ser='http://www.bea.com/wli/sb/services'"
                   nsXsi = "declare namespace xsi='http://www.w3.org/2001/XMLSchema-instance'"
                   nsTran = "declare namespace tran='http://www.bea.com/wli/sb/transports'"
                   nsEnv = "declare namespace env='http://www.bea.com/wli/config/env'"
                   nsCon = "declare namespace con='http://www.bea.com/wli/sb/services/security/config'"
                   nsCon1 = "declare namespace con1='http://www.bea.com/wli/sb/services/security/config'"
                   # when we try to parse the following Xpath Expression, it' working but not sufficent to access the <con:policy-expression> element
                   confPath = "ser:coreEntry/ser:security/con:access-control-policies/con1:transport-level-policy"
                   confElem = serviceDefinition.selectPath(nsSer + nsXsi + nsTran + nsEnv + nsCon + nsCon1 + confPath )
                   print "WORKING{%s}" % confElem
                   # get the result
                   # <xml-fragment xsi:type="con:ProviderPolicyContainerType" xmlns:con="http://www.bea.com/wli/sb/security/accesscontrol/config" xmlns:con1="http://www.bea.com/wli/sb/services/security/config" xmlns:ser="http://www.bea.com/wli/sb/services" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tran="http://www.bea.com/wli/sb/transports" xmlns:env="http://www.bea.com/wli/config/env">
                   # <con:policy provider-id="XACMLAuthorizer">
                   # <con:policy-expression>Usr(USER_1,USER_2,USER_3)</con:policy-expression>
                   # </con:policy>
                   # </xml-fragment>
                   # and when we try to acces the <con:policy> element whith the following Xpath expression we got an empty result
                   confPath = "ser:coreEntry/ser:security/con:access-control-policies/con1:transport-level-policy/con:policy"
                   confElem = serviceDefinition.selectPath(nsSer + nsXsi + nsTran + nsEnv + nsCon + nsCon1 + confPath )
                   print "DON'T WORKING{%s}" % confElem
                   # get empty result
                   # array([], org.apache.xmlbeans.XmlObject)
              # want to modify the value like this on the <con:policy-expression> but cannot reach it ...
              #confValue="Usr(USER_A,USER_B,USER_C)"
              #confElem.setStringValue(confValue)
              # commit                
              SessionMBean.activateSession(sessionName, "description for session activation")
              disconnect
    # print the service definition
    def printServiceDefinition( domain_name ):
              # connection
              connect( 'weblogic', 'weblogic', 't3://localhost:7001')
              domainRuntime()
              # create a session
              sessionName = String("SessionScript"+Long(System.currentTimeMillis()).toString())
              SessionMBean = findService( SessionManagementMBean.NAME ,SessionManagementMBean.TYPE)
              SessionMBean.createSession(sessionName)
              # get service ref
              ConfigurationMBean = findService(String("ALSBConfiguration.").concat(sessionName), "com.bea.wli.sb.management.configuration.ALSBConfigurationMBean")               
              bsQuery = ProxyServiceQuery()
              bsQuery.setPath("default/*")
              refs = ConfigurationMBean.getRefs(bsQuery)
              for ref in refs:
                   print 'ref=%s'%ref
                   servConfMBean = findService( "%s.%s" % (ServiceConfigurationMBean.NAME, sessionName), ServiceConfigurationMBean.TYPE)
                   serviceDefinition = servConfMBean.getServiceDefinition(ref)
                   servConfMBean = findService( "%s.%s" % (ServiceConfigurationMBean.NAME, sessionName), ServiceConfigurationMBean.TYPE)
                   serviceDefinition = servConfMBean.getServiceDefinition(ref)
                   print serviceDefinition
              # commit                
              SessionMBean.activateSession(sessionName, "description for session activation")
              disconnect
    #accessControlSecurity1('cluster_domain')
    accessControlSecurity2('cluster_domain')

    Hello,
    I try to reproduce with WLST script the input from the consol to declare user on Access Control proxy (security).
    sbconsol->$Proxy Service->Security->General Confiruration->Access Control->Transport Access Control->Add Conditions
    * First implementation without success with the com.bea.wli.sb.security.management.configuration.ServiceSecurityConfigurationMBean : accessControlSecurity1()
    * Second try with the service definition of the proxy service but cannot parse with Xpath accessControl Security2()
    any idee ???
    test case :
    prerequisit
    create an ALSB domain 10.3 (admin one with username='weblogic' password='weblogic' url='t3://localhost:7001') and create a proxy service on the default project
    conf/setEnv.cmd
    @CLS
    @echo ON
    @set BEA_HOME=D:\PRODUCT\MIDDLEWARE\SOA\OSB_10.3
    @set WL_HOME=%BEA_HOME%\wlserver_10.3
    @set OSB_HOME=%BEA_HOME%\osb_10.3
    @set SCRIPTING_HOME=E:\PROJETS\RECURANT\EDF\linky\WLST\WORKING\Security
    @set OSB_LIB=%OSB_HOME%/lib/sb-kernel-api.jar;%BEA_HOME%/modules/com.bea.alsb.statistics_1.0.1.0.jar;%OSB_HOME%/lib/sb-kernel-resources.jar;%OSB_HOME%/lib/sb-kernel-common.jar;%OSB_HOME%/lib/sb-kernel-impl.jar;%OSB_HOME%\lib\sb-security.jar;%OSB_HOME%/modules/com.bea.common.configfwk_1.3.0.0.jar;%BEA_HOME%/modules/com.bea.common.configfwk_1.2.0.0.jar;%BEA_HOME%/modules/com.bea.common.configfwk_1.2.1.0.jar;%OSB_HOME%/lib/modules/com.bea.alsb.resources.archive.jar;
    @set TOOL_LIB=%SCRIPTING_HOME%\lib\log4j-1.2.15.jar;%SCRIPTING_HOME%\lib\jsch-0.1.43.jar;%SCRIPTING_HOME%\lib\db2jcc.jar
    @set CLASSPATH=%OSB_LIB%;%TOOL_LIB%;%CLASSPATH%
    @set CLASSPATH=%SCRIPTING_HOME%\lib\db2jcc.jar;%TOOL_LIB%;%CLASSPATH%
    @set MODULE_LIB=%SCRIPTING_HOME%\lib
    @call %WL_HOME%\server\bin\setWLSEnv.cmd > nul 2<&1
    launch.cmd
    @CLS
    @echo OFF
    @SETLOCAL
    @call "conf\setEnv.cmd" > nul 2<&1
    set PWD=%~dp0
    %JAVA_HOME%\bin\java -Dmodule.lib=%MODULE_LIB% weblogic.WLST -skipWLSModuleScanning lib/security.py
    lib/security.py
    from com.bea.wli.monitoring import StatisticType
    from java.util import HashMap
    from java.util import HashSet
    from java.util import ArrayList
    from java.util import Collections
    from java.io import FileInputStream
    from java.io import FileOutputStream
    from java.lang import String
    from java.lang import Boolean
    from com.bea.wli.sb.util import EnvValueTypes
    from com.bea.wli.config.env import EnvValueQuery;
    from com.bea.wli.config import Ref
    from com.bea.wli.config.customization import Customization
    from com.bea.wli.config.customization import EnvValueCustomization
    from com.bea.wli.config.customization import FindAndReplaceCustomization
    from com.bea.wli.sb.management.configuration import SessionManagementMBean
    from com.bea.wli.sb.management.configuration import ALSBConfigurationMBean
    from com.bea.wli.sb.management.query import BusinessServiceQuery
    from com.bea.wli.sb.management.query import ProxyServiceQuery
    from com.bea.wli.sb.management.configuration import ServiceConfigurationMBean
    import os
    # before, create an ALSB domain 10.3 with a proxy service in the default project and add an Acces Control Policy in the consol
    # sbconsol->Project Explorer->default->${proxy service}->Security->Access Control->Create Session->Add Conditions->User->USR_1->Add
    # when we try to modify the Acces Control Policy of the proxy service with the ServiceSecurityConfigurationMBean
    def accessControlSecurity1( domain_name ):
              # connection
              print "\n\n\n***********************************************************************************************"
              connect( 'weblogic', 'weblogic', 't3://localhost:7001')
              domainRuntime()
              # create a session
              sessionName = String("SessionScript"+Long(System.currentTimeMillis()).toString())
              SessionMBean = findService( SessionManagementMBean.NAME ,SessionManagementMBean.TYPE)
              SessionMBean.createSession(sessionName)
              # get the ServiceSecurityConfigurationMBean
              serviceSecurityConfigurationMBean = findService(String("ServiceSecurityConfiguration.").concat(sessionName), "com.bea.wli.sb.security.management.configuration.ServiceSecurityConfigurationMBean")
              # get the XACMLAuthorizer
              working_directory=pwd()
              serverConfig()
              xacmlAuthorizer = cd('/SecurityConfiguration/%s/Realms/myrealm/Authorizers/XACMLAuthorizer' % domain_name )
              cd(working_directory)
              domainRuntime()
              # get service ref
              ConfigurationMBean = findService(String("ALSBConfiguration.").concat(sessionName), "com.bea.wli.sb.management.configuration.ALSBConfigurationMBean")
              bsQuery = ProxyServiceQuery()
              bsQuery.setPath("default/*")
              refs = ConfigurationMBean.getRefs(bsQuery)
              for ref in refs:
                   print 'ref=%s'%ref               
                   # use the security Mbean to add : USER_A,USER_B,USER_C to the policy
                   policyHolder = serviceSecurityConfigurationMBean.newAccessControlPolicyHolderInstance(xacmlAuthorizer)
                   policyHolder.setPolicyExpression("Usr(USER_A,USER_B,USER_C)")     
                   policyScope = serviceSecurityConfigurationMBean.newDefaultMessagePolicyScope(ref)
                   serviceSecurityConfigurationMBean.setAccessControlPolicy(policyScope,policyHolder)
                   # print the service definition
                   servConfMBean = findService( "%s.%s" % (ServiceConfigurationMBean.NAME, sessionName), ServiceConfigurationMBean.TYPE)
                   serviceDefinition = servConfMBean.getServiceDefinition(ref)
                   print serviceDefinition
                   # we can see the security entry in the service definition has follow
                   # <xml-fragment xmlns:ser="http://www.bea.com/wli/sb/services" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tran="http://www.bea.com/wli/sb/transports" xmlns:env="http://www.bea.com/wli/config/env">
                   # <ser:coreEntry isProxy="true" isEnabled="true" isAutoPublish="false">
                   # <ser:description/>
                   # <ser:security>
                   # <con:access-control-policies xmlns:con="http://www.bea.com/wli/sb/services/security/config">
                   # <con:message-level-policies>
                   # <con1:default-policy xsi:type="con:ProviderPolicyContainerType" xmlns:con="http://www.bea.com/wli/sb/security/accesscontrol/config" xmlns:con1="http://www.bea.com/wli/sb/services/security/config">
                   # <con:policy provider-id="XACMLAuthorizer">
                   # <con:policy-expression>Usr(USER_A,USER_B,USER_C)</con:policy-expression>
                   # </con:policy>
                   # </con1:default-policy>
                   # </con:message-level-policies>
                   # </con:access-control-policies>
                   # </ser:security>
              # but when we commit
              SessionMBean.activateSession(sessionName, "description for session activation")
              # we got the following exception
              # Unexpected error: com.bea.wli.config.session.SessionConflictException
              # No stack trace available.
              # Problem invoking WLST - Traceback (innermost last):
              # File "E:\PROJETS\RECURANT\EDF\linky\WLST\WORKING\Security\lib\security.py", line 246, in ?
              # File "E:\PROJETS\RECURANT\EDF\linky\WLST\WORKING\Security\lib\security.py", line 105, in accessControlSecurity1
              # com.bea.wli.config.session.SessionConflictException: Conflicts for session SessionScript1363339726764
              # [Non-Critical] Concurrent Modification Conflicts
              # NONE
              # [Critical] Resources with validation errors
              # 1 - ProxyService test/PS_TEST_bis CannotCommit
              # + CannotCommit [OSB Security:386836]Unnecessary proxy wide message access control policy found for service "test/PS_TEST_bis". Hint: The service is neither an active security
              # intermediary nor has custom authentication enabled. ServiceDiagnosticLocation[SECURITY_TAB]:DiagnosticLocation:<con:message-level-policies xmlns:ser="http://www.bea.com/wli/sb/services" xml
              # ns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tran="http://www.bea.com/wli/sb/transports" xmlns:env="http://www.bea.com/wli/config/env" xmlns:con="http://www.bea.com/wli/sb/services/security/config">
              # <con1:default-policy xsi:type="con:ProviderPolicyContainerType" xmlns:con="http://www.bea.com/wli/sb/security/accesscontrol/config" xmlns:con1="http://www.bea.com/wli/sb/services/security/
              # config">
              # <con:policy provider-id="XACMLAuthorizer">
              # <con:policy-expression>Usr(USER_A,USER_B,USER_C)</con:policy-expression>
              # </con:policy>
              # </con1:default-policy>
              # </con:message-level-policies>
              # [Info] Informational messages
              # NONE
              # at com.bea.wli.config.session.SessionManager.commitSessionUnlocked(SessionManager.java:358)
              # at com.bea.wli.config.session.SessionManager.commitSession(SessionManager.java:339)
              # at com.bea.wli.config.session.SessionManager.commitSession(SessionManager.java:297)
              # at com.bea.wli.config.session.SessionManager.commitSession(SessionManager.java:306)
              disconnect()                              
    # when we try to modify the Acces Control Policy of the proxy service whith the service XML definition
    def accessControlSecurity2( domain_name ):
              # connection
              print "\n\n\n***********************************************************************************************"
              connect( 'weblogic', 'weblogic', 't3://localhost:7001')
              domainRuntime()
              # create a session
              sessionName = String("SessionScript"+Long(System.currentTimeMillis()).toString())
              SessionMBean = findService( SessionManagementMBean.NAME ,SessionManagementMBean.TYPE)
              SessionMBean.createSession(sessionName)
              # get service ref
              ConfigurationMBean = findService(String("ALSBConfiguration.").concat(sessionName), "com.bea.wli.sb.management.configuration.ALSBConfigurationMBean")               
              bsQuery = ProxyServiceQuery()
              bsQuery.setPath("default/*")
              refs = ConfigurationMBean.getRefs(bsQuery)
              for ref in refs:
                   print 'ref=%s'%ref
                   servConfMBean = findService( "%s.%s" % (ServiceConfigurationMBean.NAME, sessionName), ServiceConfigurationMBean.TYPE)
                   serviceDefinition = servConfMBean.getServiceDefinition(ref)
                   # parsing the proxy definition
                   nsSer = "declare namespace ser='http://www.bea.com/wli/sb/services'"
                   nsXsi = "declare namespace xsi='http://www.w3.org/2001/XMLSchema-instance'"
                   nsTran = "declare namespace tran='http://www.bea.com/wli/sb/transports'"
                   nsEnv = "declare namespace env='http://www.bea.com/wli/config/env'"
                   nsCon = "declare namespace con='http://www.bea.com/wli/sb/services/security/config'"
                   nsCon1 = "declare namespace con1='http://www.bea.com/wli/sb/services/security/config'"
                   # when we try to parse the following Xpath Expression, it' working but not sufficent to access the <con:policy-expression> element
                   confPath = "ser:coreEntry/ser:security/con:access-control-policies/con1:transport-level-policy"
                   confElem = serviceDefinition.selectPath(nsSer + nsXsi + nsTran + nsEnv + nsCon + nsCon1 + confPath )
                   print "WORKING{%s}" % confElem
                   # get the result
                   # <xml-fragment xsi:type="con:ProviderPolicyContainerType" xmlns:con="http://www.bea.com/wli/sb/security/accesscontrol/config" xmlns:con1="http://www.bea.com/wli/sb/services/security/config" xmlns:ser="http://www.bea.com/wli/sb/services" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tran="http://www.bea.com/wli/sb/transports" xmlns:env="http://www.bea.com/wli/config/env">
                   # <con:policy provider-id="XACMLAuthorizer">
                   # <con:policy-expression>Usr(USER_1,USER_2,USER_3)</con:policy-expression>
                   # </con:policy>
                   # </xml-fragment>
                   # and when we try to acces the <con:policy> element whith the following Xpath expression we got an empty result
                   confPath = "ser:coreEntry/ser:security/con:access-control-policies/con1:transport-level-policy/con:policy"
                   confElem = serviceDefinition.selectPath(nsSer + nsXsi + nsTran + nsEnv + nsCon + nsCon1 + confPath )
                   print "DON'T WORKING{%s}" % confElem
                   # get empty result
                   # array([], org.apache.xmlbeans.XmlObject)
              # want to modify the value like this on the <con:policy-expression> but cannot reach it ...
              #confValue="Usr(USER_A,USER_B,USER_C)"
              #confElem.setStringValue(confValue)
              # commit                
              SessionMBean.activateSession(sessionName, "description for session activation")
              disconnect
    # print the service definition
    def printServiceDefinition( domain_name ):
              # connection
              connect( 'weblogic', 'weblogic', 't3://localhost:7001')
              domainRuntime()
              # create a session
              sessionName = String("SessionScript"+Long(System.currentTimeMillis()).toString())
              SessionMBean = findService( SessionManagementMBean.NAME ,SessionManagementMBean.TYPE)
              SessionMBean.createSession(sessionName)
              # get service ref
              ConfigurationMBean = findService(String("ALSBConfiguration.").concat(sessionName), "com.bea.wli.sb.management.configuration.ALSBConfigurationMBean")               
              bsQuery = ProxyServiceQuery()
              bsQuery.setPath("default/*")
              refs = ConfigurationMBean.getRefs(bsQuery)
              for ref in refs:
                   print 'ref=%s'%ref
                   servConfMBean = findService( "%s.%s" % (ServiceConfigurationMBean.NAME, sessionName), ServiceConfigurationMBean.TYPE)
                   serviceDefinition = servConfMBean.getServiceDefinition(ref)
                   servConfMBean = findService( "%s.%s" % (ServiceConfigurationMBean.NAME, sessionName), ServiceConfigurationMBean.TYPE)
                   serviceDefinition = servConfMBean.getServiceDefinition(ref)
                   print serviceDefinition
              # commit                
              SessionMBean.activateSession(sessionName, "description for session activation")
              disconnect
    #accessControlSecurity1('cluster_domain')
    accessControlSecurity2('cluster_domain')

Maybe you are looking for

  • Report Generation Toolkit, Error 1706

    I'm trying to run some report generation toolkit examples, typically those that plot data in various charts in Excel. However I'm consistently receiving the attached error, seemingly saying that I require Microsoft Project -- something that seems str

  • Lumia 800 dead pixel

    Hello there, I have a big dead pixel in my screen,http://t.co/TocB2KX7  and I want to know if Nokia will repair it for free. I am in Canada and I have my device for only 2 months.

  • MERGE INTO

    Hi All, i need an expert advice in this matter, and if possible please explain with some code/example.Here is the situation. This process will read all records in the STAGING_TABLE and process the data into the MY_DATABASE tables. STG_ID will be used

  • ESS/MSS business packages "Deployed with Warning"

    Hello All,    We are on NW04s SP10 on MS SQL server and Windows server. The Database and portal installations or on different machines. I installed the business packages ESS 1.0, MSS 1.0 and the XSS components - 600 using the JSPM. After I deploy, I

  • Sybase ASE to Oracle Database 11g Migration

    Hi, I am looking for documentation on migration from Sybase ASE to Oracle Database 11g Migration. Front End application is Peoplesoft. Please suggest documentation on the same. I look forward to you reply. Best regards Sonali