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