Uploaded image for project: 'Cocoon'
  1. Cocoon
  2. COCOON-1843

LDAPTransformer: add-entry tag doesn't work

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.1.9
    • None
    • Blocks: Naming
    • None
    • Normal
    • Patch available

    Description

      When I try to add an entry, i've got the following xml:

      <?xml version="1.0" encoding="ISO-8859-1"?><LDAPUSER xmlns:ldap="http://apache.org/cocoon/LDAP/1.0">
            <exec-element xmlns="http://apache.org/cocoon/LDAP/1.0"/>
      </LDAPUSER>

      And the entry isnt't added to ldap server.

      I made a patch to solve this problem. I use the "filter" and the "attribute" (in the existing dtd) tag to describe the dn and the attributes to be added.
      The following xml add an entry:
      <LDAPUSER>
      <ldap:execute-add>
      <ldap:initializer>com.sun.jndi.ldap.LdapCtxFactory</ldap:initializer>
      <ldap:authentication>simple</ldap:authentication>
      <ldap:version>3</ldap:version>
      <ldap:serverurl>ldap://localhost&lt;/ldap:serverurl>
      <ldap:port>389</ldap:port>
      <ldap:scope>OBJECTS_SCOPE</ldap:scope>
      <ldap:searchbase>o=neworganization,dc=eposse,dc=it</ldap:searchbase>
      <ldap:rootdn>cn=update,dc=eposse,dc=it</ldap:rootdn>
      <ldap:password>secret</ldap:password>
      <ldap:debug>TRUE</ldap:debug>
      <ldap:deref-link>TRUE</ldap:deref-link>
      <ldap:count-limit>0</ldap:count-limit>
      <ldap:time-limit>0</ldap:time-limit>
      <ldap:filter>
      cn=Nicola Scendoni,o=neworganization,dc=eposse,dc=it
      </ldap:filter>
      <ldap:doc-element>LDAP</ldap:doc-element>
      <ldap:row-element>LDAPSET</ldap:row-element>
      <ldap:error-element>ERROR</ldap:error-element>
      <ldap:attribute name="sn">Scendoni</ldap:attribute>
      <ldap:attribute name="cn">Nicola Scendoni</ldap:attribute>
      <ldap:attribute name="objectclass">top</ldap:attribute>
      <ldap:attribute name="objectclass">person</ldap:attribute>
      </ldap:execute-add>
      </LDAPUSER>

      and return the folloring xml:

      <LDAPUSER>
      <add_element>
      <dn>
      cn=nicola Scendoni,o=neworganization,dc=eposse,dc=it
      </dn>
      <sn>Scendoni</sn>
      <cn>nicola Scendoni</cn>
      <objectclass>top</objectclass>
      <objectclass>person</objectclass>
      </add_element>
      </LDAPUSER>

      Attachments

        Activity

          People

            Unassigned Unassigned
            nscendoni Nicola Scendoni
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: