on 06-10-2015 4:34 PM
Hi all,
I am using PI Directory for mass updating communication channels. The update consists of mass deactivate active channels in the Directory.
I am using the web service CommunicationChannelIn to udpate.
The problem is that this web service, do not give the possibility of updating individual properties of a communication channel.
In order to change one property, let say AdapterStatus, we need to read the whole adapter settings by using the read operation of the web service, getting the result of class com.sap.xi.basis.CommunicationChannel, build a new object of type com.sap.xi.basis.RestrictedCommunicationChannel by using setters and getters methods, with changing the wanted channel property, and then call the change operation to update.
Here is the code snippet i have used in order to copy all the channel properties before calling the update method :
The problem with this approach is that i am not sure to have copied all the wanted properties (thanks SAP for having used a different java class types form read operation and the change one ...) and that i am not loosing some information in the copy process ...
Any comment or idea to ensure that the channels are copied exactly as they are ?
Thanks alots,
Nadir
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you Raghu for your reply.
But for me it is not possible to use the same objet that is returned by the method Read directly in the change method. This is because these are not using same classes :
- The Read Method of the web service returns communication channels as objects of type : com.sap.xi.basis.CommunicationChannel
- The Change method uses objcts of type com.sap.xi.basis.RestrictedCommunicationChannel.
And there is no way to cast from on type into the other.
Nadir
Thanks again for your reply !
I am trying to hook the wsdl of the CommunicationChannelIn service in order to force the use of the CommunicationChannel class instead of the RestrictedCommunicationChannel in the change operation and the regenerate the java proxy and data types classes. I will tell if that works.
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
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.