We need to import users through an XML-file.
Our XML file is currently like this (with 1 test user):
<?xml version="1.0" encoding="utf-8" ?>
<Users>
<User>
<AccessUserID></AccessUserID>
<AccessUserParentID>0</AccessUserParentID>
<AccessUserUserName>dt</AccessUserUserName>
<AccessUserPassword>dt</AccessUserPassword>
<AccessUserType>0</AccessUserType>
<AccessUserValidFrom>2010-06-23T14:53:49</AccessUserValidFrom>
<AccessUserValidTo>2999-12-31T00:00:00</AccessUserValidTo>
<AccessUserRead>0</AccessUserRead>
<AccessUserActive>1</AccessUserActive>
<AccessUserLevel>0</AccessUserLevel>
<AccessUserInheritAddress>1</AccessUserInheritAddress>
<AccessUserSort>0</AccessUserSort>
<AccessUserStatus>0</AccessUserStatus>
<AccessUserHideStat>0</AccessUserHideStat>
<AccessUserAllowBackend>0</AccessUserAllowBackend>
</User>
</Users>
We are trying to import it through the extended import/export module, using the "Local Source File --> User destination"-pipeline. It isn't working. We need help.
Can anyone describe how it should be done? A working XML-file would be appreciated.
Developer forum
E-mail notifications
Importing users.
Posted on 24/06/2010 16:43:15
Replies
Jeppe Eriksson Agger
Posted on 29/06/2010 09:44:43
Hi,
First off, I'll assume you're importing users to the new Users and Intranet/Extranet modules (the ones shipped with DW7).
Second, did you have a look at the XSD schema available in the "User destination" activity?
Thirdly, you need to use the "XML file source" instead of the "Local file source" and set Root to "Users" and XPath to "/Users/User" in your example.
I've included a revised example of you XML. I've removed the nodes that didn't match the schema and added some that were required by the schema.
<?xml version="1.0" encoding="utf-8" ?>
<Users>
<User>
<AccessUserID></AccessUserID>
<AccessUserParentID>0</AccessUserParentID>
<AccessUserUserName>dt</AccessUserUserName>
<AccessUserPassword>dt</AccessUserPassword>
<AccessUserName>dt</AccessUserName>
<AccessUserEmail>dt@dt.dk</AccessUserEmail>
<AccessUserType>5</AccessUserType>
<AccessUserValidFrom>2010-06-23T14:53:49</AccessUserValidFrom>
<AccessUserValidTo>2999-12-31T00:00:00</AccessUserValidTo>
<AccessUserModules></AccessUserModules>
<AccessUserInformation></AccessUserInformation>
<AccessUserCustomerNumber></AccessUserCustomerNumber>
<AccessUserRead>0</AccessUserRead>
<AccessUserPasswordDate></AccessUserPasswordDate>
<AccessUserActive>1</AccessUserActive>
<AccessUserLevel>0</AccessUserLevel>
<AccessUserInheritAddress>1</AccessUserInheritAddress>
<AccessUserSort>0</AccessUserSort>
<AccessUserStatus>0</AccessUserStatus>
<AccessUserHideStat>0</AccessUserHideStat>s
</User>
</Users>
Please note the "AccessUserType" node. In order for the user to appear in the User Management, this needs to be set to "5".
- Jeppe
First off, I'll assume you're importing users to the new Users and Intranet/Extranet modules (the ones shipped with DW7).
Second, did you have a look at the XSD schema available in the "User destination" activity?
Thirdly, you need to use the "XML file source" instead of the "Local file source" and set Root to "Users" and XPath to "/Users/User" in your example.
I've included a revised example of you XML. I've removed the nodes that didn't match the schema and added some that were required by the schema.
<?xml version="1.0" encoding="utf-8" ?>
<Users>
<User>
<AccessUserID></AccessUserID>
<AccessUserParentID>0</AccessUserParentID>
<AccessUserUserName>dt</AccessUserUserName>
<AccessUserPassword>dt</AccessUserPassword>
<AccessUserName>dt</AccessUserName>
<AccessUserEmail>dt@dt.dk</AccessUserEmail>
<AccessUserType>5</AccessUserType>
<AccessUserValidFrom>2010-06-23T14:53:49</AccessUserValidFrom>
<AccessUserValidTo>2999-12-31T00:00:00</AccessUserValidTo>
<AccessUserModules></AccessUserModules>
<AccessUserInformation></AccessUserInformation>
<AccessUserCustomerNumber></AccessUserCustomerNumber>
<AccessUserRead>0</AccessUserRead>
<AccessUserPasswordDate></AccessUserPasswordDate>
<AccessUserActive>1</AccessUserActive>
<AccessUserLevel>0</AccessUserLevel>
<AccessUserInheritAddress>1</AccessUserInheritAddress>
<AccessUserSort>0</AccessUserSort>
<AccessUserStatus>0</AccessUserStatus>
<AccessUserHideStat>0</AccessUserHideStat>s
</User>
</Users>
Please note the "AccessUserType" node. In order for the user to appear in the User Management, this needs to be set to "5".
- Jeppe
Jeppe Eriksson Agger
Posted on 29/06/2010 09:45:51
Oops. Disregard the floating "s" character after the "AccessUserHideStat" node :-)
Posted on 01/07/2010 17:16:31
Excellent! Thank you for the "walk-through".
It is working perfectly.
Oh happy day.
It is working perfectly.
Oh happy day.
You must be logged in to post in the forum