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