README revision 4b4c3a2028eea921136be5b4717c69c074b4982e
2N/ASample 5 - Synchronization of Two Resources
2N/A-------------------------------------------
2N/ACopyright (c) 2012 ForgeRock AS
2N/AThis work is licensed under a Creative Commons Attribution-
2N/ANonCommercial-NoDerivs 3.0 Unported License. See
2N/Ahttp://creativecommons.org/licenses/by-nc-nd/3.0/
2N/A
2N/AThis sample demonstrates flowing data between external resources. It simulates
2N/Atwo directory resources using XML files.
2N/A
2N/AFor documentation pertaining to this example see:
2N/Ahttp://openidm.forgerock.org/doc/install-guide/index.html#more-sample5
2N/A
2N/ATo try the sample, follow these steps.
2N/A
2N/A 1. Start OpenIDM with the configuration for sample 5.
2N/A $ cd /path/to/openidm
2N/A $ ./startup.sh -p samples/sample5
2N/A When you start OpenIDM, it creates a data in the new external resource
2N/A file that represents an AD directory, samples/sample5/data/xml_AD_Data.xml.
2414N/A The new file is empty until you run reconciliation.
2N/A
2N/A 2. Run reconciliation.
32N/A $ curl --header "X-OpenIDM-Username: openidm-admin" --header "X-OpenIDM-Password: openidm-admin" --request POST "http://localhost:8080/openidm/recon?_action=recon&mapping=systemLdapAccounts_managedUser"
32N/A {"reconId":"b149f0e3-4bb9-4790-9266-fab2e5c80ec6"}
313N/A
313N/A 3. Check
313N/A $ cat /path/to/openidm/samples/sample5/data/xml_AD_Data.xml
313N/A <?xml version="1.0" encoding="UTF-8"?>
313N/A <icf:OpenICFContainer xmlns:icf="http://openidm.forgerock.com/xml/ns/public/resource/openicf/resource-schema-1.xsd"
313N/A xmlns:ri="http://openidm.forgerock.com/xml/ns/public/resource/instances/resource-schema-extension"
313N/A xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
313N/A xsi:schemaLocation="http://openidm.forgerock.com/xml/ns/public/resource/instances/resource-schema-extension samples/sample5/data/resource-schema-extension.xsd http://openidm.forgerock.com/xml/ns/public/resource/openicf/resource-schema-1.xsd samples/sample5/data/resource-schema-1.xsd">
313N/A <ri:__ACCOUNT__>
2104N/A <ri:firstname>Darth</ri:firstname>
2104N/A <icf:__DESCRIPTION__/>
313N/A <icf:__GROUPS__/>
313N/A <icf:__UID__>68077c05-32ae-4438-b250-d23be784ea07</icf:__UID__>
313N/A <icf:__NAME__>DDOE1</icf:__NAME__>
313N/A <ri:email>mail1@example.com</ri:email>
2104N/A <icf:__PASSWORD__>initial_Passw0rd</icf:__PASSWORD__>
313N/A <icf:__ENABLE__/>
2104N/A <ri:lastname>Doe</ri:lastname>
127N/A </ri:__ACCOUNT__>
127N/A </icf:OpenICFContainer>
1256N/A
1256N/A 4. Create a new user in the source external resource file,
1256N/A samples/sample5/data/xml_LDAP_Data.xml, and run reconciliation again
127N/A to see the result show up in samples/sample5/data/xml_AD_Data.xml.
538N/A