Lab 5: Programming the Subscriber Shim to Modify PBXSimulator Accounts
Important · You can troubleshoot your program by using printlines similar to the one below: System.out.println( debugMsgString ); Where debugMsgString is your own debug string. Your debug strings will be sent to DSTrace output where they can help you logically isolate problems in your code. Do This 1. Once you get the LabDriver from Lab 3 or 4 working, shut down ConsoleOne and use the NT Services console to shut down eDirectory. EXPLANATION:During this lab you will be writing new methods for the PBXSimulator Subscriber shim. When eDirectory starts up, its Java Virtual Machine reads and caches all the class/jar files. So, in order for NDS or NT to see the new classes/jars, you must shut it down and restart it. Both the subscriber and publisher in the lab driver filter on attributes in User objects. This way, changes to Users on both the NDS and PBXSimulator sides can be detected and pushed to the opposing side. However, the lab driver's subscriber filters on attributes in Organizational Unit objects as well. Because the subscriber filters OUs, it receives notification of OU events. Therefore, if a new OU corresponding to a location or department is created in NDS, the subscriber can create a corresponding container in PBXSimulator. 2.Find the lab 5 hints in the file "LabSubscriptionShim.java" and follow the instructions located there to write code to handle a modify event from NDS. EXPLANATION:The DirXML engine will notify the Subscriber shim of an event that occurred in NDS by sending the shim an XDS document describing the event. The XDS document might look something like the XDS below: <modify class-name="User" src-dn="\TREE\O\OU\OBJ" src-entry-id="32899"> The job of a subscriber shim is to translate the event from XDS into a format that is understandable by the external system, which can then implement the event. In the example shown above the lab subscriber should produce an XDS document looking something like that shown below: "evtType^mod employee,emplid^002,title^new title" When the above string is sent to PBXSimulator, it will find the account associated with the value 002 and change its title field to "new title." Your job in this lab is to use the org.w3c.dom package JavaDoc installed on your workstation for reference to modify the executeUserEvent() AND getModAttrValist() methods in LabSubscriptionShim.java so that the lab subscriber will navigate the XDS document to build a PBXSimulator event string similar to the one above. 3.Test the Subscriber side of your driver. EXPLANATION:After you have rebuilt and copied the driver JAR to "c:\Novell\NDS\Lib", start up the driver, DSTrace, and ConsoleOne. Find an object in NDS which you know has been associated with an account in PBXSimulator. Make a change to the title attribute in the NDS object and then click the Property Page's "Apply" button. The Subscriber should immediately detect the event and attempt to perform the change you specified. If the change is pushed to PBXSimulator, your Subscriber side works. You can view the document you are working with at any time by: // First, create XmlDocument from DOM Document you are
|
|||||||||||||||||||||||||||||||||||||
![]() |
|||||||||||||||||||||||||||||||||||||