You need to define an xml namespace for lsc.  For example:

<lsc xmlns="http://lsc-project.org/XSD/lsc-core-2.0.xsd"; revision="0">

...

</lsc>


On 8/14/2012 5:04 PM, Jurgen Weber wrote:
Hi

I am trying to sync from openldap to AD and I can not get the xml to work.... All I get is the following exception:

[org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element 'lsc'.]

and yes, I have the element defined. Using version 2.0. Config file:

<lsc>
  <connections>
    <ldapConnection>
       <id>AD</id>
       <authentication>simple</authentication>
       <url>ldap://asdfasdf:389/dc=asdf,dc=local</url>
<username>CN=Administrator,CN=Users,DC=asdf,DC=local</username>
       <password>asdf</password>
       <pageSize>1000</pageSize>
    </ldapConnection>
    <ldapConnection>
       <id>openldap</id>
       <authentication>SIMPLE</authentication>
       <url>ldap://asdf:389/dc=matrix</url>
       <username>cn=admin,dc=matrix</username>
       <password>asdf</password>
    </ldapConnection>
  </connections>
  <tasks>
    <task>
      <name>adUser</name>
      <source class="ldapSrcService">
        <name>ad-src-service</name>
        <baseDn>cn=Users</baseDn>
<getAllFilter>(&amp;(sAMAccountName=*)(objectClass=user))</getAllFilter>
<getOneFilter>(&amp;(objectClass=inetOrgPerson)(uid={uid}))</getOneFilter>
<pivotAttributes><string>sAMAccountName</string></pivotAttributes>
      </source>
      <destination class="ldapDstService">
        <name>openldap-dst-service</name>
        <baseDn>ou=People</baseDn>
<getAllFilter>(&amp;(uid=*)(objectClass=posixAccount))</getAllFilter>
<getOneFilter>(&amp;(objectClass=user)(sAMAccountName={uid}))</getOneFilter>
<pivotAttributes><string>uid</string></pivotAttributes>
      </destination>
<propertiesBasedSyncOptions>
<mainIdentifier>"cn=" + srcBean.getDatasetFirstValueById("cn") + ",ou=users"</mainIdentifier>
    <defaultPolicy>FORCE</defaultPolicy>
    <defaultDelimiter>;</defaultDelimiter>
    <dataset>
     <name>objectClass</name>
     <policy>FORCE</policy>
     <forceValues>
<string>"top";"user";"person";"organizationalPerson"</string>
     </forceValues>
    </dataset>
    <dataset>
     <name>sAMAccountName</name>
     <policy>KEEP</policy>
     <createValues>
<string>srcBean.getDatasetFirstValueById("uid")</string>
     </createValues>
    </dataset>
    <dataset>
     <!-- userPrincipalName = uid + "@lsc-project.org" -->
     <name>userPrincipalName</name>
     <policy>FORCE</policy>
     <forceValues>
<string>srcBean.getDatasetFirstValueById("uid") + "@asdf.local"</string>
     </forceValues>
    </dataset>
    <dataset>
     <name>userAccountControl</name>
     <policy>KEEP</policy>
     <createValues>
<string>AD.userAccountControlSet( "0", [AD.UAC_SET_NORMAL_ACCOUNT])</string>
     </createValues>
    </dataset>
    <dataset>
<!-- pwdLastSet = 0 to force user to change password on next connection -->
     <name>pwdLastSet</name>
     <policy>KEEP</policy>
     <createValues>
      <string>"1"</string>
     </createValues>
    </dataset>
    <dataset>
<!-- unicodePwd = "changeit" at creation (requires SSL connection to AD) -->
     <name>unicodePwd</name>
     <policy>KEEP</policy>
     <createValues>
      <string>AD.getUnicodePwd("changeit")</string>
     </createValues>
    </dataset>
   </>
  </task>
 </tasks>
</lsc>

So what is wrong with this?

Thanks


_______________________________________________________________
Ldap Synchronization Connector (LSC) - http://lsc-project.org

lsc-users mailing list
[email protected]
http://lists.lsc-project.org/listinfo/lsc-users

Reply via email to