cancel
Showing results for 
Search instead for 
Did you mean: 

PI Directory API - Communication Channel Change

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

helloanikolkata
Explorer
0 Kudos

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

Former Member
0 Kudos

Thanks Anirban.  I ended up doing the same.

mukuldhar1
Explorer
0 Kudos

Hello Sat,

Do you mind to share the steps and tool details with code snippet.

Thanks,

Mukul

Former Member
0 Kudos

Please follow below link to know about the tools and process to use the Directory API.

0 Kudos

Hello Sat,

Thanks for your prompt response.

Can you please let me know which Integration Directory API will allow me to change the communication channel Connection details (with user id and password).

Thanks,

Mukul

Answers (1)

Answers (1)

VijayKonam
Active Contributor
0 Kudos

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

Former Member
0 Kudos

I'm reading and setting Adapter meta data. Unfortunatly, password data is not returned by directory api call (CC - Read method).

Is there a specific type of value that I need to set to retain pwd?

Thanks for your time.

VijayKonam
Active Contributor
0 Kudos

I remember reading that, for security reasons the Directory API metadata read does not return passwords. Your program must be aware of the password and supply it I guess..!!

VJ

Former Member
0 Kudos

I'm changing the channel status to Active or Inactive; my program doesn't know the password.

I guess, CC change is not effective for business if contains password field. Not sure, how it is missed by SAP PI team while building Directory API.

Thanks

VijayKonam
Active Contributor
0 Kudos

By the way, could you please tell me which SAP_BASIS PI content version you are using? I was trying with 7.11 but was not able to get the WSDL imported without errors and the Service and Port classes were confusing. Tried searching for 7.20 content, but could not find them..!!

VJ

Former Member
0 Kudos

SAP BASIS 7.10

anandvithal
Active Participant
0 Kudos

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