You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by e nio <en...@yahoo.com> on 2003/07/16 08:50:23 UTC

Use of LDAP - equivalent command line?

I tried the Wiki samples for LDAP and can not get it to work.
All Im getting is an empty bodied tags. No error. The captured
log after the LDAPTransformer is practically empty body just the
element tags.  The openldap logs does show responses with the
result, it is just not getting recieved by cocoon
LDAPTransformer and put in to xml. 

What would be the equivalent command line like:
ldapsearch -b 'stooges'  '(cn=*)'    ## this works for me

for the doldapqry.xml below

<?xml version="1.0" encoding="ISO-8859-1"?>
<LDAPUSER xmlns:ldap="http://apache.org/cocoon/LDAP/1.0">
      <ldap:execute-query>
        
<ldap:initializer>com.sun.jndi.ldap.LdapCtxFactory</ldap:initializer>
         <ldap:authentication>simple</ldap:authentication>
         <ldap:version>3</ldap:version>
         <ldap:serverurl>ldap://localhost</ldap:serverurl>
         <ldap:port>389</ldap:port>
         <ldap:scope>SUBTREE_SCOPE</ldap:scope>
         <!--<ldap:scope>ONELEVEL_SCOPE</ldap:scope>-->
         <ldap:searchbase>o=stooges</ldap:searchbase>
         <ldap:rootdn>cn=StoogeAdmin,o=stooges</ldap:rootdn>
         <ldap:password>sxxxxx1</ldap:password>
         <ldap:debug>FALSE</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=*)</ldap:filter>
         <ldap:show-attribute>TRUE</ldap:show-attribute>
         <ldap:doc-element>LDAP</ldap:doc-element>
         <ldap:row-element>LDAPSET</ldap:row-element>
         <ldap:error-element>ELEMENT</ldap:error-element>
        <ldap:attribute>givenName</ldap:attribute>
        <ldap:attribute>sn</ldap:attribute>
        <ldap:attribute>fullName</ldap:attribute>
        <ldap:attribute>l</ldap:attribute>
        <ldap:attribute>telephoneNumber</ldap:attribute>
      </ldap:execute-query>
</LDAPUSER>                                                   

---- snippet of sitemap.xmap --
<map:match pattern="doldapqry">
  <map:generate src="LdapQry.xml" />
  <map:transform type="ldap" />
  <map:serialize type="xml" /> 
</map:match>

-- output result is, basically blank  ----
<?xml version="1.0" encoding="UTF-8"?>
<LDAPUSER xmlns:ldap="http://apache.org/cocoon/LDAP/1.0">
<!--<ldap:scope>ONELEVEL_SCOPE</ldap:scope>-->
<LDAP
xmlns="http://apache.org/cocoon/LDAP/1.0"><LDAPSET/><LDAPSET><telephoneNumber/><l/><givenName/><sn/></LDAPSET><LDAPSET><telephoneNumber/><l/><givenName/><sn/></LDAPSET><LDAPSET><telephoneNumber/><l/><givenName/><sn/></LDAPSET></LDAP>
</LDAPUSER>


Thanks in advance for any help.
enio


__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Use of LDAP - equivalent command line?

Posted by Frank Taffelt <fr...@interface-business.de>.
i had same problem. the solution is to make sure that you have exactly the
correct JDK - endorsed libs, provided with your running cocoon version.

In my case, the JDK endorsed libs were from cocoon-2.1m2 and the cocoon
version i used was cocoon2.1m3. This combination showed exactly the
behaviour that you are describing.

try it ...

hth,
frank


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Use of LDAP - equivalent command line?

Posted by Yury Mikhienko <Yu...@mobicomk.ru>.
On Tue, 15 Jul 2003 23:50:23 -0700 (PDT)
e nio <en...@yahoo.com> wrote:

> I tried the Wiki samples for LDAP and can not get it to work.
> All Im getting is an empty bodied tags. No error. The captured
> log after the LDAPTransformer is practically empty body just the
> element tags.  The openldap logs does show responses with the
> result, it is just not getting recieved by cocoon
> LDAPTransformer and put in to xml. 
> 
> What would be the equivalent command line like:
> ldapsearch -b 'stooges'  '(cn=*)'    ## this works for me
> 
> for the doldapqry.xml below
> 
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <LDAPUSER xmlns:ldap="http://apache.org/cocoon/LDAP/1.0">
>       <ldap:execute-query>
>         
> <ldap:initializer>com.sun.jndi.ldap.LdapCtxFactory</ldap:initializer>
>          <ldap:authentication>simple</ldap:authentication>
>          <ldap:version>3</ldap:version>
>          <ldap:serverurl>ldap://localhost</ldap:serverurl>
>          <ldap:port>389</ldap:port>
>          <ldap:scope>SUBTREE_SCOPE</ldap:scope>
>          <!--<ldap:scope>ONELEVEL_SCOPE</ldap:scope>-->
>          <ldap:searchbase>o=stooges</ldap:searchbase>
>          <ldap:rootdn>cn=StoogeAdmin,o=stooges</ldap:rootdn>
>          <ldap:password>sxxxxx1</ldap:password>
>          <ldap:debug>FALSE</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=*)</ldap:filter>
>          <ldap:show-attribute>TRUE</ldap:show-attribute>
>          <ldap:doc-element>LDAP</ldap:doc-element>
>          <ldap:row-element>LDAPSET</ldap:row-element>
>          <ldap:error-element>ELEMENT</ldap:error-element>
>         <ldap:attribute>givenName</ldap:attribute>
>         <ldap:attribute>sn</ldap:attribute>
>         <ldap:attribute>fullName</ldap:attribute>
>         <ldap:attribute>l</ldap:attribute>
>         <ldap:attribute>telephoneNumber</ldap:attribute>
>       </ldap:execute-query>
> </LDAPUSER>                                                   
> 
> ---- snippet of sitemap.xmap --
> <map:match pattern="doldapqry">
>   <map:generate src="LdapQry.xml" />
>   <map:transform type="ldap" />
>   <map:serialize type="xml" /> 
> </map:match>
> 
> -- output result is, basically blank  ----
> <?xml version="1.0" encoding="UTF-8"?>
> <LDAPUSER xmlns:ldap="http://apache.org/cocoon/LDAP/1.0">
> <!--<ldap:scope>ONELEVEL_SCOPE</ldap:scope>-->
> <LDAP
> xmlns="http://apache.org/cocoon/LDAP/1.0"><LDAPSET/><LDAPSET><telephoneNumber/><l/><givenName/><sn/></LDAPSET><LDAPSET><telephoneNumber/><l/><givenName/><sn/></LDAPSET><LDAPSET><telephoneNumber/><l/><givenName/><sn/></LDAPSET></LDAP>
> </LDAPUSER>
> 
> 
> Thanks in advance for any help.
> enio
> 
> 

Try set the (&amp;(cn=*)) filter instead of (cn=*)

-- 
 
Best regards,
Yury Mikhienko.
IT engineer, ZAO "Mobicom-Kavkaz"

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org