Agile Classes.jar file - eclipse

I am using Agile PLM Version: 9.3.0.2 (Build 20). I am on the client side. I'm trying to use Eclipse to interact with Agile's API features. According to the Agile SDK Developer Guide I need both:
AgileAPI.jar
agileclasses.jar
I have the AgileAPI.jar file, but I don't have the agileclasses.jar file.
Any suggestions/links/ methods in which I can obtain this file!

AgileAPI.jar, contains the factories and interfaces used by the Agile EJB on server side.
If you have an Agile instance on a server, you don't need to have agileclasses.jar (unofficial API) but creating an IAgileSession using AgileSessionFactory, all the implementation of interfaces (IChange, IPrograms, IItem. etc) are retrieved using it.
session.getObject(IChange.OBJECT_TYPE, "ChangeNumber123");
where did you find that agileclasses.jar is required?
However, you can find them in the Weblogic Server shared lib folder.
EDIT
Eclipse interacts with an Agile Server using AgileAPI.jar.
String server = "http://myServer:7001/Agile";
HashMap<Integer,String> params = new HashMap<Integer, String>();
AgileSessionFactory instance = AgileSessionFactory.getInstance(server);
params.put(AgileSessionFactory.USERNAME, "myUsername");
params.put(AgileSessionFactory.PASSWORD, "myPassword");
IAgileSession session=instance.createSession(params);
IItem item = (IItem) session.getObject(IItem.OBJECT_TYPE, "ITEMID1234");
item.setValue("Page Two.MYFIELD", "Value");
The example above, connect to an instance of Agile (server) already started up and get the item with number ITEMID1234. Then it sets the value of a field (MYFIELD) with "Value"

Related

Freeradius 2.x to 3.x LDAP configuration with multiple AD trees

I am trying to migrate an older 2.x server to 3.x due to the LDAPS connectivity requirement for a new AD tree/domain that is being created. I had to upgrade not only Freeradius but the server OS to support newer versions of TLS. I roughly had the configuration I think correct in 2.x, but cannot be 100% certain as authentication to the new AD tree structure was not completely working because of the SSL/TLS incompatibility. I am having a harder time with the new module configuration layout in 3.x.
The current 2.x performs authentication for 2 methods:
1) LDAP to the existing AD tree using a redundant server setup
2) SQL/PERL via a custom module.
The new 3.x server I need to perform 3 authentication checks via 2 methods:
1) LDAP to the existing AD tree using a redundant server setup
2) LDAPS to the new AD tree (possible redundant server setup)
3) SQL/PERL via the custom module
I have read that this may require templates for the LDAP configuration, but have not found any examples for that. Any help/guidance would be greatly appreciated.
The config is all in the LDAP module configuration file, raddb/mods-available/ldap - the ldap attribute map is in there, too.
To connect to two different LDAP servers, create two instances of the ldap module, e.g. where you have
ldap {
...
}
add another copy of that config with
ldap ldap-new {
...
}
then you can call ldap or ldap-new as appropriate in the server where needed to query the required LDAP server.
Make sure you create the appropriate symlinks to enable the module, e.g. raddb/mods-enabled/ldap -> ../mods-available/ldap.
You can certainly use templates to save duplicating config, but to begin with it's a lot easier to just copy the ldap config file, change the instance name in the new file and then tweak from there. Templates are likely to make things more confusing unless you know what you're doing.

Loading Drools Rules from database during JBPM server load up

We are using jBPM for our process flow needs. However, this jBPM process is triggered via REST APIs from our Java code. Thus,
Java App had application code and we trigger the jBPM process from here using APIs.
jBPM instance( JBPM 6.1 ) is being used for the process flow execution. This instance is also there but is accessed remotely.
Now, we are trying to integrate the Drools engine for our business rules needs. What we want is that we will store all our rules in the database and these rules will be loaded when the JBPM server starts up( or when the Java VM boots up). Thus, the rules will be loaded into the working memory and be available for use in the JBPM process when needed.
2 questions here:-
1) How do we get this done ( loading rules from the database and getting them into the working memory of JBPM and Drools right when the JBPM server loads up)?
The idea is that once the rules are loaded, they can be accessed anywhere in process as needed.
Also, if we wanted to update the jBPM variable with the value obtained from the Drools rules what were loaded earlier, how can we do that ?
At startup, you can do this by loading the resources from the database and converting the strings to byte arrays and creating the knowledge base:
Resource workflowResource = ResourceFactory.newByteArrayResource(workflowBpmnByteArray);
Resource rulesResource = ResourceFactory.newByteArrayResource(resourceByteArray);
KnowledgeBuilder knowledgeBuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
knowledgeBuilder.add(workflowResource, ResourceType.BPMN2);
knowledgeBuilder.add(rulesResource, ResourceType.DRL);
KnowledgeBaseConfiguration config = KnowledgeBaseFactory.newKnowledgeBaseConfiguration();
KnowledgeBase knowledgeBase = KnowledgeBaseFactory.newKnowledgeBase("knowledgeBase", config);
knowledgeBase.addKnowledgePackages(knowledgeBuilder.getKnowledgePackages());
Remember that adding resources to the knowledge builder will cause them to be compiled so you should check for errors before creating the knowledge base.
The resulting knowledge base can be cached in memory and used for creating process instances within your application.

Java application getting projects and their associations from MS Project Server 2013

I want to use the REST api of a locally installed MS Project Server 2013 in order to get all projects and their associations(tasks, deliverables and resources) so that I will bind them with the business model of my custom J2ee application. So, I have 2 questions:
According to what I've read so far in MS Project Server documentation, I can use either ProjectData service or ProjectServer resource. What is considered more appropriate for my case?
Can anyone give me a simple example of getting projects and their associations using a Jersey client? Would something like the below be correct using the ProjectData service?
String url = "http://<pwa_site>/_api/ProjectData/$metadata";
Client client = Client.create();
WebResource webResource = client.resource(url);
ClientResponse response=webResource.accept("application/xml")
.get(ClientResponse.class);
String output = response.getEntity(String.class);
Any help would be appreciated.
ProjectData provides OData read-only access to the 38 entities for reporting. ProjectServer provides the main functionality of the Project Server Interface (PSI) for the primary entities.
For OData service, I use Apache Olingo library:
https://olingo.apache.org/doc/odata2/index.html

How to create SOAPAdater using IBM worklight 6.2?

I am trying to create Soap Adapter using IBM Work light but I am not able to get web services methods to work light projects Services folder. When I am running my project after deployment of adapter it will not showing proper output. Let me know if anyone had made demo or some good Links related to it.
Your explanation does not provide the steps you have actually taken nor the expected output, the service you are using, the error you're getting, etc... so it is somewhat difficult to understand/recreate the issue... Also, please do mention the build number of the Worklight Studio 6.2 installation you're using.
There is no such thing as a "SOAP adapter" per-se. What you are referring to is "HTTP adapter" that is generated by providing a WSDL scheme location.
For example, WebServiceX.net provides a global weather service.
In order to generate an adapter from the above:
Create a new project
In the project structure, right-click on the Services folder and select "Discover back-end services"
From the "Service type" dropdown, select "Web Service Definition Language (WSDL)"
In the "URL" field paste "http://www.webservicex.net/globalweather.asmx?WSDL" and click on "Go"
From the "Select Service" table, select a service and click on "Finish"
The end result is a new HTTP adapter in the adapters folder called "SoapAdapter1", containing an auto-generated XML and -impl.js file ready to use.
You can read more about it, here:
HTTP adapters training module, slide #16
Generating adapters with the services discovery wizard user documentation topic
I also suggest using the very latest iFix available for the 6.2.0.1 release, as it contains some WSDL-related fixes, so best to be up-to-date.
It can be downloaded from either IBM Fix Central or from the Eclipse Marketplace (Eclipse > Help > Marketplace).
Finally I have successfully consume weather Soap service.
Below given is main function which should call after successful connection.
function loadContactSuccess(result){
WL.Logger.debug("Device is connected to WL server");
WL.Logger.info("Inside loadContactSuccess" );
var list = result.invocationResult.Envelope.Body.GetWeatherInformationResponse.GetWeatherInformationResult.WeatherDescription;
console.log("list detail ..." + list);
sessionStorage.setItem("WeatherDescription", JSON.stringify(result.invocationResult.Envelope.Body.GetWeatherInformationResponse.GetWeatherInformationResult.WeatherDescription));
WL.Logger.debug("WeatherDescription list :: ", JSON.parse(sessionStorage.getItem("WeatherDescription")));
var tempValue = JSON.parse(sessionStorage.getItem("WeatherDescription"));
console.log("Inside loadContactSuccess ..." + tempValue.length);
text = "";
var i;
for (i = 0; i < tempValue.length; i++) {
text += tempValue[i].WeatherID +" "+"<img src="+ tempValue[i].PictureURL +">" + "<br>";
}
document.getElementById("demo").innerHTML = text ;
}
You can also download demo example create by me from URL.Click Here

Upgrading from DeploymentService to ProfileService in JBoss 5.1.0 GA

In Jboss 5.1 the Profile Service does what the Deployment Service was doing in Jboss 4.x.In Jboss 4.x I was using the Deployment Service to create a datasource "on-the-fly" and I was wondering if I could do the same thing using the Profile Service (since Deployment Service doesn't exist any more in Jboss 5.x).
Does anyone know a practical guid on using ProfileService?
Thank you ,
Regards.
I don't know of any guide but I can provide you with my experience using the Profile Service and a few links to JBoss wiki pages on this topic. I'd like to post more links but the spam protection doesn't allow me to post more than two, but you should easily find the other pages in the wiki on the ProfileService. Don't be suprised in case you don't find much, there isn't more.
ProfileService ManagementView
http://community.jboss.org/wiki/ProfileServiceManagementView
ProfileService DeploymentTemplates
http://community.jboss.org/wiki/ProfileServiceDeploymentTemplates
There you'll find usefull information about the ProfileService but no detailed information is available in the jboss wiki as far as I can tell.
In order to create Datasources on the fly you can use the DeploymentTemplates (also for creating message queues and topics) The last link provides you with information on how to use the templates but not with all the template names and their properties. You can list them programatically though.
// Get all Templates
for(String template : mgtView.getTemplateNames())
{
System.out.println("=========================================");
System.out.println("Listing properties for template: "+template);
DeploymentTemplateInfo info = mgtView.getTemplate(template);
for(String prop : info.getProperties().keySet())
System.out.println("- "+prop);
}
In order to get the ManagementView (mgtView) from an external java programm you can use something similiar to this:
// set security policy
System.setProperty("java.security.policy", "<path_to_policy_file>");
System.setSecurityManager( new RMISecurityManager() ) ;
// set initial context properties
Hashtable<String, String> env = new Hashtable<String, String>();
env.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
env.put("java.naming.provider.url","jnp://localhost:1099");
env.put("java.naming.factory.url.pkgs","org.jboss.naming:org.jnp.interfaces");
ctx = new InitialContext(env);
// login to JBoss
SecurityClient client = SecurityClientFactory.getSecurityClient();
client.setSimple("admin", "admin");
client.login();
// get ProfileService and ViewManager
ProfileService ps = (ProfileService) ctx.lookup("ProfileService");
mgtView = ps.getViewManager();
What you want to get is the Java Naming Conext (InitialContext). In order to do that you'll need a security policy (you can use the java.policy file which is located in JBOSS_HOME/server/SERVER_DIR/conf/),security manager and environment properties to get the context. The java.naming.provider.url specifies the location of the JBoss naming service (default port is 1099).
Usually you would have to authenticate at this point which is done with the SecurityClient.
Finally you can use the context to grap the ProfileService.
At this point most of the anoying stuff is done und you can start playing around.
getViewManager() returns the ViewManager with which you can create datasources on the fly and getDeploymentManager() will give you the DeploymentManager with which you can deploy, undeploy, start, stop applications and other deployments.
The libraries you'll need to do that are located in
JBOSS_HOME/client
JBOSS_HOME/lib
JBOSS_HOME/common/lib
I've read several times that including the jbossall-client.jar in the client directory should be enough but that's actually not true. You need libraries from all three directories as far as I can tell (couldn't do it without referencing all of them at least). I haven't figured out which exact jars you need though...
IMPORTANT: The ProfileService in Jboss 5 Community Edition has some bugs though which got fixed in JBoss 6. I'd either suggest using a newer JBoss version or the Enterprise Edition.