on 09-08-2011 8:30 PM
Building an application using SAP PI Directory API to read existing communication channel(s) and to update them to change the Status (Active / Inactive). I'm able to change the status but not able to retain the password in the channel; For example, JDBC channel has DB user id and password. After successfully changing the status, Channel is loosing password.
Here is the logic that I'm following to change the communication channel.
Using Communication Channel Service
- Read method to get communication channel object
- Change method to change the status
- In change method, I'm creating CommunicationChalleRestricted object based on the CommunicationChannel object received in Read method. (using get and set methods)
Also, I'm dynamically creating and activate/reverting the Change list while performing the change operation.
Please note that the communication channel service in WSNavigator is not showing the password when executing READ method. I've also tried OpenForChange method, but the same issue.
How can I make password retained while changing the existing communication channel?
Any help is greatly appreciated.
Thanks
Sat
Hi Sat,
If you use the programming interface, there is no ‘delta’ handling of attribute changes. This means that when you make a change to an object, you will still need to specify all the attributes for that object, just as though it is a create.
Thanks,
Anirban
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think you must also read the communication channel meta data and then set it again before activating the channel. Did not try this though.
VJ
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sat,
I had implemented a tool to make mass channel active or inactive using a simple excel-sheet interface. I had faced the password issue when i was implementing this. But i came to know that password are not stored as plain text but instead they are stored as encrypted text with some complex encryption algorithm and key. And also due to security reasons the web-services in PI do not return password(not even the encrypted string).
So to update,save and activate any channel in PI you simply need to skip the AdapterSpecificAttribute which has "password" as the name. Below is the pseudo code(java) for this
...
ArrayList<GenericProperty> ASA = new ArrayList<GenericProperty>();
Loop all AdapterSpecificAttributes:
if(Name.tolowercase().contains("password"))
{
// skip
}
else
{
GenericProperty attr = new GenericProperty();
attr.setName(Name);
attr.setValue(Value);
ASA.add(attr);
}
Loop End:
//set ASA to the CommunicationChannel object AdapterSpecificAttribute
....
Note: Not tested the above code so make changes accordingly(as required). I have implemented this same logic and it worked.
Hope it helps,
Thanks,
Anand
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.