And where must I write this DTD, and what is his name and extension? I have never used any DTD And then, in the sitemap must I write : ... <map:transform type="ldap"/> ...
-----Original Message----- From: Yury Mikhienko [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 04, 2003 5:03 PM To: [EMAIL PROTECTED] Subject: Re: XSP & LDAP -> The tags aren't interpreted > I use cocoon 2.0 > the output on the explorer is : > ldap://ldap.innosoft.com(&(objectclass=pet)(cn=B*))ou=Pets,dc=Innosoft,d > c=comonetrue10owner,givenname,descriptionfalse > In all versions of cocoon (2.0,2.0.3,4 ) in LDAPTransformer the following DTD is used. <snip> * The following DTD is valid:<br> * <!ELEMENT execute-query (attribute+ | show-attribute? | scope? | initializer? | authentication? | error-element? | sax-error? doc-element? | row-element? | version? | serverurl? | rootdn? | password? | deref-link? | count-limit? | searchbase, filter)><br> * <!ELEMENT execute-increment (attribute | show-attribute? | scope? | initializer? | authentication? | error-element? | sax-error? | doc-element? | row-element? | version? | serverurl? | rootdn? | password? | deref-link? | count-limit? | searchbase, filter)><br> * increments (+1) an integer attribute on a directory-server (ldap)<br> * <br> * <!ELEMENT initializer (#PCDATA)>+ (default: "com.sun.jndi.ldap.LdapCtxFactory")<br> * <!ELEMENT authentication (#PCDATA)>+ (default: "simple")<br> * <!ELEMENT version (#PCDATA)>+ (default: "2")<br> * <!ELEMENT serverurl (#PCDATA)>+<br> * <!ELEMENT port (#PCDATA)>+ (default: 389)<br> * <!ELEMENT rootdn (#PCDATA)>+<br> * <!ELEMENT password (#PCDATA)>+<br> * <!ELEMENT scope (ONELEVEL_SCOPE | SUBTREE_SCOPE | OBJECT_SCOPE)>+ (default: ONELEVEL_SCOPE)<br> * <!ELEMENT searchbase (#PCDATA)>+<br> * <!ELEMENT doc-element (#PCDATA)>+ (default: "doc-element")<br> * <!ELEMENT row-element (#PCDATA)>+ (default: "row-element")<br> * <!ELEMENT error-element (#PCDATA)>+ (default: "ldap-error") (in case of error returned error tag)<br> * <!ELEMENT sax_error (TRUE | FALSE)>+; (default: FALSE) (throws SAX-Exception instead of error tag)<br> * <!ELEMENT attribute (#PCDATA)><br> * <!ELEMENT show-attribute (TRUE | FALSE)> (default: TRUE)<br> * <!ELEMENT filter (#PCDATA | execute-query)><br> * <!ELEMENT deref-link (TRUE | FALSE)> (default: FALSE)<br> * <!ELEMENT count-limit (#PCDATA)> (integer default: 0 -> no limit)<br> * <!ELEMENT time-limit (#PCDATA)> (integer default: 0 -> infinite)<br> * <!ELEMENT debug (TRUE | FALSE)>+; (default: FALSE)<br> * <br> * + can also be defined as parameter in the sitemap. * <br> * <br> * * @author Felix Knecht * @version CVS $Id: LDAPTransformer.java,v 1.6 2002/02/22 07:03:56 cziegeler Exp $ */ </snip> and the following namespace: http://apache.org/cocoon/LDAP/1.0 But what are you using? simple real example: <ldap:execute-query> <ldap:initializer>com.sun.jndi.ldap.LdapCtxFactory</ldap:initializer> <ldap:serverurl>ldap://ldap.my.host</ldap:serverurl> <ldap:port>389</ldap:port> <ldap:scope>OBJECTS_SCOPE</ldap:scope> <ldap:rootdn>cn=DN</ldap:rootdn> <ldap:password>password</ldap:password> <ldap:searchbase>ou=people,o=company</ldap:searchbase> <ldap:attribute>urls</ldap:attribute> <ldap:attribute>title</ldap:attribute> <ldap:attribute>mobile</ldap:attribute> <ldap:attribute>cn</ldap:attribute> <ldap:attribute>sn</ldap:attribute> <ldap:attribute>zone</ldap:attribute> <ldap:attribute>sleep</ldap:attribute> <ldap:attribute>trace</ldap:attribute> <ldap:attribute>admin</ldap:attribute> <ldap:show-attribute>true</ldap:show-attribute> <ldap:filter>(&(uid=testuser))</ldap:filter> </ldap:execute-query> > > No. > Can you send me the output of work? > And what the version of cocoon you use? > > > doesn't work. Is there anything to add in the cocoon.xconf maybe? > > > > > > Try the following: > > <?xml version="1.0" encoding="KOI8-R"?> > > <xsp:page > > language="java" > > xmlns:xsp="http://apache.org/xsp" > > xmlns:ldap="http://apache.org/cocoon/LDAP/1.0"> > > > > instead of > > <xsp:page language="java" > > xmlns:ldap="http://www.apache.org/2000/LDAP" > > xmlns:xsp="http://apache.org/xsp" > > xmlns:session="http://apache.org/xsp/session/2.0" > > xmlns:esql="http://apache.org/cocoon/SQL/v2" > > xmlns:xsp-request="http://apache.org/xsp/request/2.0" > > > > > > > Yes, that works. now, how can I use it? When I use it like : > > > <map:pipeline> > > > <map:match pattern="testldap"> > > > <map:generate type="serverpages" > > > src="workflowmanager/documents/{1}.xsp"/> > > > <map:transform type="ldap"/> > > > <map:serialize/> > > > </map:match> > > > </map:pipeline> > > > and in the xsp page I write this sample page (from the apache site). > > And > > > then I just get text as result. The tags aren't interpreted. > > > > > > <xsp:page language="java" > > > xmlns:ldap="http://www.apache.org/2000/LDAP" > > > xmlns:xsp="http://apache.org/xsp" > > > xmlns:session="http://apache.org/xsp/session/2.0" > > > xmlns:esql="http://apache.org/cocoon/SQL/v2" > > > xmlns:xsp-request="http://apache.org/xsp/request/2.0" > > > > > > > > > > > > > <page> > > > <ldap:execute-query> > > > <ldap:server-url>ldap://ldap.innosoft.com</ldap:server-url> > > > <ldap:query>(&(objectclass=pet)(cn=B*))</ldap:query> > > > <ldap:search-base>ou=Pets,dc=Innosoft,dc=com</ldap:search-base> > > > > > > <ldap:scope>one</ldap:scope> > > > <ldap:deref-link>true</ldap:deref-link> > > > <ldap:count-limit>10</ldap:count-limit> > > > <ldap:attributes>owner,givenname,description</ldap:attributes> > > > <ldap:relative-dn>false</ldap:relative-dn> > > > </ldap:execute-query> > > > </page> > > > </xsp:page> > > > > > > > > > > > > -----Original Message----- > > > From: Yury Mikhienko [mailto:[EMAIL PROTECTED] > > > Sent: Wednesday, June 04, 2003 2:39 PM > > > To: [EMAIL PROTECTED] > > > Subject: Re: XSP & LDAP > > > > > > > > > Put the jndi.jar into the $COCOON_SRC_DIR/lib/optional > > > Check the $COCOON_SRC_DIR/lib/jars.xml > > > for following lines: > > > <file> > > > <title>jndi LDAP API</title> > > > <description>Java API for LDAP works</description> > > > <used-by>LDAP Transformer</used-by> > > > <lib>optional/jndi.jar</lib> > > > <homepage>http://java.sun.com/products/jndi</homepage> > > > </file> > > > > > > and rebuild the cocoon. > > > > > > After rebuilding, in the > > > > $COCOON_SRC_DIR/build/cocoon/classes/org/apache/cocoon/transformation > > > you find the LDAPTransformer.class and > LDAPTransformer$LDAPQuery.class > > > > > > > there aren't in the cocoon.jar (org/apache/cocoon/transformation) > > > > Should I add them? Where can I find them? > > > > > > > > Check the : > > > > LDAPTransformer.class > > > > LDAPTransformer$LDAPQuery.class > > > > in the your cocoon.jar (org/apache/cocoon/transformation) > > > > > > > > > I have them, into the cocoon/web-inf/lib I have these libs : > > > > > jndi.jar > > > > > jaas.jar > > > > > ldap.jar > > > > > ldapbp.jar > > > > > ldapsec.jar > > > > > providerutil.jar > > > > > > > > > > but I doesn't work. Still have the "class not found" error > > > > > > > > > > > When I declare the transformer > > > > > > <map:transformer name="ldap" > > > > > > src="org.apache.cocoon.transformation.LDAPTransformer"/> > > > > > > in the sitemap I get the error "class not found". > > > > > > Do I need some special libs? > > > > > > > > > -- > > Best regards, > Yury Mikhienko. > IT engineer, ZAO "Mobicom-Kavkaz" > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Best regards, Yury Mikhienko. IT engineer, ZAO "Mobicom-Kavkaz" --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]