A way to configure WebSphere 8.5 Liberty Profile programmatically? - websphere-8

I'm moving from IBM RAD 8 / WAS 7.0 to IBM RAD 9 / WAS 8.5. Liberty Profile. There's a plenty of configuration things such as URLs and namespace bindings.
I've found an information that WSADMIN is not working for Liberty Profile. I haven't found, however, the information, how to access similar functionality as in wsadmin/jython, for example for creating URLs, namespace bindings, etc.?
How to script such things under WebSphere Liberty Profile?

I'll try to address a few things that are implied by your use of wsadmin. I may be overshooting, but I hope this helps:
WSADMIN applies only to the full WebSphere Application Server. jython scripting for the Liberty profile is possible, though you're basically performing JMX operations on a server. Here is something to get started with: https://www.ibmdw.net/wasdev/docs/creating-remote-jmx-connections-with-jython/
There is no way to reconfigure a Liberty profile server via a JMX operation, however. All server configuration (or reconfiguration) is done by editing the server configuration file (either manually with an editor of your choice, via the eclipse tools, or with a script that modifies your XML).
The Liberty profile does not support CORBA or CORBA namespaces (corbaloc or corbaname), or remote EJBs. Liberty profile servers also are not part of the cell/node topology of full profile servers. Instead, Liberty profile servers form collectives, as described here:
http://pic.dhe.ibm.com/infocenter/wasinfo/v8r5/topic/com.ibm.websphere.wlp.core.doc/ae/cwlp_collective_arch.html
You can add strings to JNDI using the jndiEntry element in your server configuration as described here: http://pic.dhe.ibm.com/infocenter/wasinfo/v8r5/topic/com.ibm.websphere.wlp.core.doc/ae/twlp_dep_jndi.html
Information about configuring datasources (I am guessing at what you might need URLs and namespace bindings for) is here (see also the subtopics): http://pic.dhe.ibm.com/infocenter/wasinfo/v8r5/topic/com.ibm.websphere.wlp.core.doc/ae/twlp_dep_configuring_ds.html.

The easiest way is to edit the XML directly or using a script in the language of your choice. The idea is that the config is simple enough wsadmin is no longer needed - it's intended to be human readable and human maintainable. You can import XML snippets if you have repeated config elements you want to share similar elements across multiple servers, or create the same config elements multiple times.

Related

how to develop a custom connector in SailPoint

I am novices to the field of Identity and Access management.
Till now I know, Sail point has provided the some direct connectors to integrate the known systems like LDAP, HR systems, OIM, Databases..
And sailpoint also provided the support for disconnected applications with the use of Custom connectors.
Here, My question is how to develop a custom connector..?
I do not have jar file provided by sailpoint which contain "AbstractConnector" class.
So that I can write my own class and develop..?
I also so not understand, what to do with that class?(if i have a jar)
How sailpoint will refer to that class..
Do we need to deploy that class to somewhere...
Here I am expecting the complete flow to develop and deploy the custom connector..
If anyone is working please help..
If you unzip your identityiq.war, you'll find a JAR file called WEB-INF/lib/connector-bundle.jar. This is the JAR where you'll find AbstractConnector. Once you've written your connector code, you will need to compile it and bundle it into a JAR file, which you will place into WEB-INF/lib.
Finally, you will need to update the ConnectorRegistry object (under Configuration on the debug screen) to reference the new class, which will make it available as an Application type. If it has custom connection parameters (as most do), you will also need an xhtml page that will be embedded into the Sailpoint UI to prompt the user configuring the Application.
If you have Compass access, they have a whitepaper called Custom Connectors that you will find helpful.
All that said, I encourage you to try to find a way to use an out-of-box connector if possible.
Most of the times it will be better if you use the DelimitedFile connector, you can import a CSV of identity data, and make it work within Sailpoint's workflow. You will be able to map fields, correlate accounts and create multi-valued group memberships rapidly. Of course, this means that Sailpoint will not be connected directly to the application, and you will have to develop a workflow to extract the identities and upload them. But at least, you can integrate without going the Custom Connector way.

what is api-paste.ini file in openstack

I've seen api-paste.ini as a conf file after installing openstack.
It looks like substituting some prefixes for python implementation but have no clue about this.
Here, my questions are:
What script is it?
it looks like very bizarre grammar like the following:
[composite:metadata]
use = egg:Paste#urlmap
/: meta
How does it work within python script?
See documentation for Paste Deploy.
The api-paste.ini is the configuration for the above web-services framework. Paste.deploy allows you to separate concerns between writing your application and middleware/filters from the composition of them into a web service. You define you WSGI applications and any middleware filters in the configuration file then you can compose pipelines which include the middleware/filters you want into your web-service, e.g. authentication, rate-limiting, etc.
You want to temporarily remove authentication, take it out of your pipeline and restart your web service.
The declaration above is declaring a composite application, but with only one application binding (a bit unnecessary - normally you would expect to see more than one binding, e.g. for different versions of the application). The WSGI application app:meta will be bound to / and you should have a declaration of app:meta later in the file. The implementation of the composite app is declared via the use and the egg:Paste#urlmap is a simple reference implementation.
You load this in your program with paste.deploy.loadwsgi.loadapp().
There is a proposal/recommendation(?) to move away from Paste Deploy/WebOb to WSME/Pecan see OpenStack Common WSGI

Programmatically define WCF-BasicHttp/WCF-WSHttp setting while consuming WCF service in BizTalk orchestration

I was trying to consume an already written WCF service into my BizTalk orchestration. But while configuring the ports and port types for the consumption, found that the 'WCF service consumption wizard' in Visual Studio offers HTTP transport-type as the only option and no WCF-BasicHttp/WCF-WSHttp transport-type options are available.
However, we can always do the required WCF-BasicHttp/WCF-WSHttp settings by importing the required bindings file from the BizTalk Admin Console, Is there a programmatic way for the developers to do the same from inside the Visual Studio (instead of specifying those bindings later from the Admin Console)?
The binding files are just XML, so you can create those programmatically. Modify the XML as you see fit, either by hand (e.g., in the built-in XML editor) or by using some sort of custom code.
Typically we use multiple binding files per environment, including one that just works with everything on localhost for developers. You just pick the one that you want and import it into BizTalk or write a script automatically import it for you (such as after build).
You can also take a look BizTalk Deployment Framework. For more of that.
Michael Stephenson has a great post on using MSBuild to automate your deployments, including the BizTalk binding files, here.

Remote Objects not working with Modules

We have some Modules which have their own remote objects configured in remoting-config.xml. Each is packaged and deployed as separate web archives (WAR). For ex. Module1.war, Module2.war.
We are trying to integrate them in a flex application which is deployed in a separate web app. For ex. MainApp.war.
The remote objects work fine when invoked from within Module1.war and Module2.war. But the java remote objects are not getting invoked when called from the main flex application MainApp.war.
I have looked at Flex Developers guide and flexcoders Yahoo group.
How are you configuring your remote objects? Are you passing the path to services-config.xml in the "-services" compiler flag? If you are, I would avoid doing this, since it doesn't give you much flexibility in the location of your services endpoints.
Christophe Coenraets has a great article on best practices for configuring RemoteObject and other data access classes in Flex. The general idea is to externalize the URLs into an XML configuration file, load that with an HTTPService when the application starts up, then use the URLs to configure your Channel/ChannelSet which are binded into the RemoteObject. Full article is here:
http://coenraets.org/blog/2009/03/externalizing-service-configuration-using-blazeds-and-lcds/

How to configure WCF in a separate dll project

I'm developing a web application (ASP.NET 3.5) that will consume a number of web services. I have created a separate dll-project for each web service: these projects contains the service reference and client code.
However, the calling website MUST have the <system.serviceModel> information (the <bindings> and <client> nodes) in it's web.config, even though this information is also in the dll's app.config file! I have tried copying the serviceclass.dll.config over to the bin directory of the website, but this didn't help.
Is there any way to centralize the configuration of a WCF client?
I've only limited WCF experience, all with BasicHTTP bindings. But I'm allergic to WCF's xml files and have managed to avoid them thus far. I don't recomend this generally but I put the configuration details in my apps existing configuration store and then apply them programatically. E.g. With a Web service proxy I use the constructor for the Client that takes 'bindings'and 'endpoint' and programatically apply the settings to the bindings & endpoint.
A more elegent solution appears to be descibed here: Reading WCF Configuration from a Custom Location, but I haven't tried it yet.
From my experience, library projects never read app.config.
So you can really delete the file because it is not used. The library's host configuration is read instead, so that is the only place the endpoint and binding configuration should be.
It's possible to forgo xml config and build up the Binding and Endpoint classes associated with the service in the constructor or a custom "Service Factory". iDesign has some good information on this:
http://www.idesign.net/idesign/DesktopDefault.aspx?tabindex=5&tabid=11
(See In Proc Factory)
In their approach, you set attributes on your services to specify at a high level how they should work (ie [Internet], [Intranet], [BusinessToBusiness]), and the service factory configures the service according to best practices for each scenario. Their book describes building this sort of service:
http://www.amazon.com/Programming-WCF-Services-Juval-Lowy/dp/0596526997
If you just want to share configuration XML config, maybe use the configSource attribute to specify a path for configuration: http://weblogs.asp.net/cibrax/archive/2007/07/24/configsource-attribute-on-system-servicemodel-section.aspx
Remember that a configuration file is is read by an executable that has an entry point. A library dll does not have an entry point so it is not the assembly that will read it. The executing assembly must have a configuration file to read.
If you would like to centralize your web configs then I would suggest you look into nesting them in IIS with virtual directories. This will allow you to use the configuration inheritance to centralize whatever you need.
There are 2 options.
Option 1. Working with channels.
If you are working with channels directly, .NET 4.0 and .NET 4.5 has the ConfigurationChannelFactory. The example on MSDN looks like this:
ExeConfigurationFileMap fileMap = new ExeConfigurationFileMap();
fileMap.ExeConfigFilename = "Test.config";
Configuration newConfiguration = ConfigurationManager.OpenMappedExeConfiguration(
fileMap,
ConfigurationUserLevel.None);
ConfigurationChannelFactory<ICalculatorChannel> factory1 =
new ConfigurationChannelFactory<ICalculatorChannel>(
"endpoint1",
newConfiguration,
new EndpointAddress("http://localhost:8000/servicemodelsamples/service"));
ICalculatorChannel client1 = factory1.CreateChannel();
As pointed out by Langdon, you can use the endpoint address from the configuration file by simply passing in null, like this:
var factory1 = new ConfigurationChannelFactory<ICalculatorChannel>(
"endpoint1",
newConfiguration,
null);
ICalculatorChannel client1 = factory1.CreateChannel();
This is discussed in the MSDN documentation.
Option 2. Working with proxies.
If you're working with code-generated proxies, you can read the config file and load a ServiceModelSectionGroup. There is a bit more work involved than simply using the ConfigurationChannelFactory but at least you can continue using the generated proxy (that under the hood uses a ChannelFactory and manages the IChannelFactory for you.
Pablo Cibraro shows a nice example of this here: Getting WCF Bindings and Behaviors from any config source
First of all class libraries (DLLs) do not have their own configuration, however they can read the configuration of their host (Web/Executable etc.). That being said, I still maintain an app.config file on the library projects as a template and easy reference.
As far as the service configuration itself is concerned, WCF configuration can make somebody easily pull their hair out. It is an over-engineered over-complicated piece. The goal of your applications should be to depend least on the configuration, while maintaining flexibility of deployment scenarios your product is going to come across.

Resources