You must also initialize the XML Agent Content Helper API and initialize its connection to one or more Policy Servers. To do this you must first create an instance of ContentHelperService, initialize it, and then call createAgentApiService() to establish the XML Agent Content Helper API's connection to the Policy Server. For example:
chs = new ContentHelperService ();
String hostConfFilePath = new String ("C:/Program Files \
/CA/SOA Security Manager/webagent/config/SmHost.conf");
chs.initialize(hostConfFilePath);
if (chs.CreateAgentApiService() != IContentHelperReturnCodes. \
SUCCESS) {}
To handle policy expressions that use SOA Agent variables, you should create an instance of ServerVariablesResolver and then initialize it by setting values for those keys by calling its setVariables() method. For example:
// create a new Server Variables Resolver object
svr = new ServerVariablesResolver ();
// initialize XMLAgent variables and Server Variables Resolver
// object
HashMap serverVarsMap = new HashMap ();
String serverVendorKey = new String ("Microsoft");
String serverVendorValue = new String ("IIS");
serverVarsMap.put (serverVendorKey , serverVendorValue );
...
svr.setVariables (serverVarsMap );
| Copyright © 2009 CA. All rights reserved. | Email CA about this topic |