I'm in the final stages of a project to allow users to use the Management Console to upload services to WSO2 governance. Once a month, we want to grab all info from WSO2 and transform into HTML and post to a wiki.
At the moment, I haven't found a convient way to export all XML from WSO2 governance through Java. The only solution I found was to grab all services with a certain tag. This is not going to work well if there are other users that do not know to add this tag.
Does any one have any ideas on how I can export the XML from all services on my WSO2 instance?
Thanks!
You have to simply call Registry.getResource() method to retrieve resources..Check the Governance Registry API for available methods..So, you can use any of them which suits to your need..
Found the answer in code here: http://ajithvblogs.blogspot.com/2013/02/how-to-invoke-custom-artifacts-using.html#!/2013/02/how-to-invoke-custom-artifacts-using.html
I needed to get the info from the artifact, not the individual resources.
GenericArtifactManager artifactManager = new GenericArtifactManager(registry, "applications");
Related
I'm using jclouds Java SDK, i search in the documentation and in the jclouds examples for how to get the tags of a Nova server, but i didn't find any mention of it. i found some other function to get the instance name, instance metadata and so on in the following code
NovaApi novaApi = computeServiceContext.unwrapApi(NovaApi.class);
String region = novaApi.getConfiguredRegions().iterator().next();
ServerApi serverApi = novaApi.getServerApi(region);
Server instance = serverApi.get(TEMP_SERVERNAME);
in the variable instance i can get information about the instance such as metadata for example, but not the tags.
my question is this OpenStack API implemented in the jclouds SDKs? if yes how can i call it?
Thanks
That API call is not yet implemented in the jclouds Server API. However, it should be pretty easy and straightforward to add that method. Would you be willing to contribute to the project and add it? I would be more than happy to help you get that done!
I have a custom workflow for which the first step is default AEM "LockProcess". But somehow the asset/page not getting locked.
I have initiated the workflow as an admin and I'm using AEM 6.2
27.07.2017 13:16:09.994 *INFO* [JobHandler:
/etc/workflow/instances/server0/2017-07-25/workflow_name:/content/project/en-
us/test-general] com.day.cq.workflow.impl.process.LockProcess Locking is not
currently enabled. This is a No-Op
The same happens for "UnlockProcess".
Am I missing something here?
Thanks!!
You can enable locking of the payload in the "Day CQ Workflow Service" configuration.
Based on comments from Adobe Forum, I found there is a property
cq.workflow.service.allow.locking that should be enabled in CQWorkflowService.
Unfortunately, I could not find CQWorkflowService in http://localhost:4502/system/console/configMgr.
Digging further I found this website Missing Service that list all missing the hyperlinks for factory service and components of AEM 6.2.
Finally, I was able to initiate the default Lockprocess.
I've written a custom User Store Manager to interface WSO2 to a database managed by ASP.Net's Simple Membership Provider. My main issue is that SMP uses PBKDF2 for password hashing and the standard JDBC User Store doesn't seem to support that.
I basically used https://docs.wso2.com/display/IS530/Writing+a+Custom+User+Store+Manager as a template, as the example implements a different password hashing algo, which is exactly my use case.
You can find my POC implementation here: github project wso2_custom_userstore I built a jar, put it into the dropins directory and restarted the server. The server complained about lack of bundle headers, but that's it. When adding a new user store there's only the standard stores, nothing more. I then configured a JDBC user store and changed the class to the one I wrote. The only effect I saw was that my previously configured User Store had vanished. I tried putting the .jar into the libs directory instead, didn't change anything.
As that didn't seem to work and the server complained about missing bundle headers I built a OSGI bundle that exported my CustomUserStoreManager Package (the source can be found on github as well, I'm not allowed to add more than two URLs) - now the bundle gets loaded and activated but nothing more. Still my class is nowhere to be seen. I don't see it as an available class in the User Store add dialog and I don't see it as an available class in the log config. No hint of it anywhere, not in the log files, not in the server's startup output. Nada.
Am I doing something wrong?
I have to add that I by no means am a Java developer nor a developer at all. I'm evaluating WSO2 for a customer and this is supposed to be a PoC. Once it works and I know that using PBKDF2 hashes are possible someone more competent is going to build a production version.
Thanks in advance,
SunTsu
WSO2 IS 5.3.0 is based on org.wso2.carbon.user.core 4.4.11 [1] and you are using 4.2.0. Documentation should be updated in this case. You can find a sample code [2] which is written for WSO2 IS 5.1.0 and article in [3].
I'm trying to figure out a way to add custom nodetypes using a CND file to my Sling WebApp. I downloaded the WAR file and got it running but since all the code is already compiled (as .class files), I can't add code to read the CND file and add the custom nodetypes.
On a separate note, I do have Jackrabbit running and with it, I can use the JackrabbitNodeTypeManager or other ways to code reading a CND file and adding nodetypes. This works on my local repository that is not running on a server.
I want to be able to add new nodetypes to the Sling Web Application in a similar way. So I'll boil my questions down to:
Is there a way to code the addition of new nodetypes in the Sling WebApp?
How can I connect my Jackrabbit repository (local) to the Sling Web Application (on server) so that I can possibly explore adding custom nodetypes this way (as I'm doing on my Jackrabbit repo locally at the moment)?
I understand that Sling is a framework that uses Jackrabbit as a repo and provides REST-like services to work with the repository, but I imagine there's a way to add these custom nodetypes just like Jackrabbit allows.
Thanks.
Is there a way to code the addition of new nodetypes in the Sling WebApp?
This is documented at Declared Node Type Registration. What you need to do is
write the node type definition in CND format
place it in a bundle
reference the file in the manifest using the Sling-Nodetypes header
deploy the bundle to your Sling app
i'm new to struts... I have a struts form. i need to analyze the data posted to an action class. i just want to output the data to a page and stop further execution so as to test of it is working correctly... how is it done..?
There are many ways to debug a struts application:
Configuration Plugin: You can use configuration plugin provided by struts. To use this plugin include struts2-config-browser-plugin-x.x.x.x.jar jar in your classpath and then you can use
">Launch the configuration browser
anywhere in your application to view a lot of detail about the action class.
The second way is to use Debugging Interceptor by using property debug=true in struts.xml.
See the below link for more details:
http://struts.apache.org/release/2.2.x/docs/debugging-struts.html
The easiest way to quickly and thoroughly inspect http requests and responses and post data is to use either:
http-fox with firefox (download)
chromes' network inspector (pre-installed with chrome - ctrl-shift-i - Network - Click on the appropriate post request and the body of the post will be displayed)
If neither of these very easy tools appeal, you'll have to find the appropriate hook to attach your debugger. I've not used struts since 2002 so cann't advise.
The best method is to use System.out.print and get the result in the tomcat console... i had said i need on server side not client side.