You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Ma...@swisscom.com on 2003/07/01 16:20:59 UTC

RE: LDAP Transformer with XSP page?

Is it possible to create the ldap.xml, with the ldap queries in a xsp
page?

-----Original Message-----
From:
cocoon-users-return-52786-Maxime.Gheysen=swisscom.com@xml.apache.org
[mailto:cocoon-users-return-52786-Maxime.Gheysen=swisscom.com@xml.apache
.org] 
Sent: Tuesday, July 01, 2003 4:10 PM
To: cocoon-users@xml.apache.org
Subject: RE: LDAP Transformer


I think there must be a way other than set the parameter in the sitemap
like :

from the ldap.xml write something like that :
<ldap:filter>(&amp;(cn=<request:get-query-string/>))</ldap:filter>

Is that possible?

-----Original Message-----
From:
cocoon-users-return-52783-Maxime.Gheysen=swisscom.com@xml.apache.org
[mailto:cocoon-users-return-52783-Maxime.Gheysen=swisscom.com@xml.apache
.org] 
Sent: Tuesday, July 01, 2003 3:59 PM
To: cocoon-users@xml.apache.org
Subject: RE: LDAP Transformer


it doesn't work. As I said the filter cannot be definied as parameter in
the sitemap. It returns the error 
[LDAPTransformer] Error in LDAP-Query:
javax.naming.directory.InvalidSearchFilterException: Empty filter;

It must be a bug or so...
But refering to the original may, with the other way to search why is it
so slow ?

>
>hello,
>I have integrated ldap into my portal as identhification system.
>My problem is that I have to put a filter to search all users from
these
>seven groups :
>DG_IT-CLI-DAR_A_00 to DG_IT-CLI-DAR_A_06
>I have to ways, the first would be to set into my filter a parameter in
>the sitemap, like 
><map:parameter name="filter" value="(cn={request-param:name})"/> 
>But it seems that the ldap transformer has a lot of bugs. The parameter
>rootdn works, password works, but both filter and serverurl doesn't
>work!!!
>
>So the only way to filter it is to search by the attribute "memberOf"
in
>every user data. But this attribute is a DN (means not substring or
>wildcards search). With a shareware I've found (LDAP Browser) I can
>search all these data, but with the ldap transformer I get the error :
>[LDAPTransformer] Error in LDAP-Query:
>javax.naming.TimeLimitExceededException: [LDAP: error code 3 -
Timelimit
>Exceeded]; remaining name 'DC=corproot,DC=net'
>Is it a bug of the ldap transformer? Is the filter to long/complex?
>
>Here is the filter (<ldap:filter>)
>
>(|(memberOf=CN=DG_IT-CLI-DAR_A_00,OU=IT_CLI-DAR,OU=IT_Generic,OU=IT_Res
,
>OU=IT,DC=corproot,DC=net)(memberOf=CN=DG_IT-CLI-DAR_A_01,OU=IT_CLI-DAR,
O
>U=IT_Generic,OU=IT_Res,OU=IT,DC=corproot,DC=net)(memberOf=CN=DG_IT-CLI-
D
>AR_A_03,OU=IT_CLI-DAR,OU=IT_Generic,OU=IT_Res,OU=IT,DC=corproot,DC=net)
(
>memberOf=CN=DG_IT-CLI-DAR_A_04,OU=IT_CLI-DAR,OU=IT_Generic,OU=IT_Res,OU
=
>IT,DC=corproot,DC=net)(memberOf=CN=DG_IT-CLI-DAR_A_05,OU=IT_CLI-DAR,OU=
I
>T_Generic,OU=IT_Res,OU=IT,DC=corproot,DC=net)(memberOf=CN=DG_IT-CLI-DAR
_
>A_06,OU=IT_CLI-DAR,OU=IT_Generic,OU=IT_Res,OU=IT,DC=corproot,DC=net))
>
>Thanks
>

-----Original Message-----
From: Yury Mikhienko [mailto:Yury.Mikhienko@mobicomk.ru] 
Sent: Tuesday, July 01, 2003 3:44 PM
To: cocoon-users@xml.apache.org
Subject: Re: LDAP Transformer


On Tue, 1 Jul 2003 14:55:52 +0200
<Ma...@swisscom.com> wrote:

> hello,
> I have integrated ldap into my portal as identhification system.
> My problem is that I have to put a filter to search all users from
these
> seven groups :
> DG_IT-CLI-DAR_A_00 to DG_IT-CLI-DAR_A_06
> I have to ways, the first would be to set into my filter a parameter
in
> the sitemap, like 
> <map:parameter name="filter" value="(cn={request-param:name})"/> 
> But it seems that the ldap transformer has a lot of bugs. The
parameter
> rootdn works, password works, but both filter and serverurl doesn't
> work!!!
> 
try the following filter syntax: (&amp;(uid={request-param:name}))





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

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


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


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


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


Re: LDAP Transformer with XSP page?

Posted by Yury Mikhienko <Yu...@mobicomk.ru>.
On Tue, 1 Jul 2003 16:20:59 +0200
<Ma...@swisscom.com> wrote:

> Is it possible to create the ldap.xml, with the ldap queries in a xsp
> page?
> 
Yes, for example:

<xsp:page
        language="java"
        xmlns:xsp="http://apache.org/xsp" 
        xmlns:ldap="http://apache.org/cocoon/LDAP/1.0">

  <page>
      <xsp:logic>
      String cn = request.getParameter("cn");
      if(cn == null) cn = "*";
     </xsp:logic>
      <ldap:execute-query>
      <ldap:initializer>com.sun.jndi.ldap.LdapCtxFactory</ldap:initializer>
      <ldap:serverurl>ldap://ldaphost</ldap:serverurl>
      <ldap:port>389</ldap:port>
      <ldap:scope>OBJECTS_SCOPE</ldap:scope>
      <ldap:rootdn>cn=Directory Manager</ldap:rootdn>
      <ldap:password>password</ldap:password>
      <ldap:searchbase>ou=people,o=company</ldap:searchbase>
      <ldap:attribute>cn</ldap:attribute>
      <ldap:attribute>sn</ldap:attribute>
      <ldap:attribute>givenName</ldap:attribute>
      <ldap:attribute>initials</ldap:attribute>
      <ldap:attribute>mobile</ldap:attribute>
      <ldap:attribute>mail</ldap:attribute>
      <ldap:attribute>ou</ldap:attribute>
      <ldap:attribute>uid</ldap:attribute>
      <ldap:attribute>title</ldap:attribute>
      <ldap:show-attribute>true</ldap:show-attribute>
      <ldap:filter>(&amp;(uid=<xsp:expr>cn</xsp:expr>)(mobile=*))</ldap:filter>
     </ldap:execute-query>
  </page>
</xsp:page>



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

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


SourceResolver in Selector?

Posted by Paul Bowler <pa...@www.aventix.co.uk>.
Anyone know how to resolve a URI within a selector?

No SourceResolver is passed to it, unlike a Transformer, and I'm trying to gain access to a local XML file with no 
luck.

Thanks,

Paul.

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