This post is for one who has been bamboozled by below interview question.
Question: "Can we have dynamic users for Created By/Updated By fields during upsert operations instead of SADMIN in siebel inbound webservices using standard authentication mechanism? "
Soln: Yes we can, provided we are running a version 8.0.0.4 or higher. Stateless session management siebel authorization is key here in the inbound services.
Below setup is required in order to make this thing work.
1 - SessionAccessService and SiebelUserProfileService - These two webservices should be active and point to correct object manager. They should use sesssion management(i.e WSSOAP = 1) mode. The authentication type for all the methods should be set to None.
Question: "Can we have dynamic users for Created By/Updated By fields during upsert operations instead of SADMIN in siebel inbound webservices using standard authentication mechanism? "
Soln: Yes we can, provided we are running a version 8.0.0.4 or higher. Stateless session management siebel authorization is key here in the inbound services.
Below setup is required in order to make this thing work.
1 - SessionAccessService and SiebelUserProfileService - These two webservices should be active and point to correct object manager. They should use sesssion management(i.e WSSOAP = 1) mode. The authentication type for all the methods should be set to None.
2 - Import wsdl and Consume SessionAccessService WS. Make a call to SessionAccess service and obtain the session token for a new Siebel User Session. For this PING method is used. The SessionToken value from the response message represents the unique Session Key that is associated with the newly authenticated and established connection for the SADMIN user. This token will be resused in subsequent requests.
3 - Import wsdl and Consume SiebelUserProfileService WS. Using the session token obtained in previous step call method "SetContactContext" of the SiebelUserProfileService. In order to maintain context it is critical to pass SessionToken key. We should also pass the input argument "Login Id" of the user
of which we want to set the context. "SetContactContext" method is added to "SiebelUserProfileService" business service as part of ACR - 385.
4 - Now once the proper context has been established, upsert call to the desired entity should be made using the original SessionToken Key within the SOAP Header section. check the thin client for the magic as updated by will display the new user login instead of user used to login object manager.
I hope it helps you make more comfortable when someone asks this question .
Happy Integration!!
אין תגובות:
הוסף רשומת תגובה