You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by "Emmanuel Lecharny (JIRA)" <di...@incubator.apache.org> on 2006/01/27 01:58:33 UTC
[jira] Created: (DIRSNICKERS-124) Control is a Class and an
Interface in two packages.
Control is a Class and an Interface in two packages.
----------------------------------------------------
Key: DIRSNICKERS-124
URL: http://issues.apache.org/jira/browse/DIRSNICKERS-124
Project: Directory ASN1
Type: Improvement
Reporter: Emmanuel Lecharny
Assigned to: Alex Karasulu
We have too elements with the same name : Control.
it's an Interface in org.apache.ldap.common.message and a class in org.apache.ldap.common.codec
We must keep only one of those two elements
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (DIRSNICKERS-124) Control is a Class and an
Interface in two packages.
Posted by "Van Nhu (JIRA)" <di...@incubator.apache.org>.
[ http://issues.apache.org/jira/browse/DIRSNICKERS-124?page=comments#action_12365230 ]
Van Nhu commented on DIRSNICKERS-124:
-------------------------------------
Thanks Emmanuel for your prompt response.
If I understand it correctly, your LDAP Proxy doesn't transform LDAP messages between Twix format and the "internal" message presentation.
Our LDAP client/proxy, when implemented with MINA + Twix Codec Provider, is currently failing to communicate with the server. It throws a NPE when running this segment of code:
public void testEncodeBindRequest() throws EncoderException
{
final BindRequestImpl req0 = new BindRequestImpl( 1 );
req0.setCredentials( "password".getBytes() );
req0.setName( "cn=admin,dc=example,dc=com" );
req0.setSimple( true );
req0.setVersion3( true );
final MessageEncoder encoder = new MessageEncoder();
encoder.encode( req0 );
}
I would suspect that a similar error will be received if you try to get the Twix Codec Provider to decode an LDAP response. The reasons for this are as I explained in my previous comment. We can discuss further off-line if that is more convenient to you.
Thanks and Regards,
Van
> Control is a Class and an Interface in two packages.
> ----------------------------------------------------
>
> Key: DIRSNICKERS-124
> URL: http://issues.apache.org/jira/browse/DIRSNICKERS-124
> Project: Directory ASN1
> Type: Improvement
> Reporter: Emmanuel Lecharny
> Assignee: Emmanuel Lecharny
>
> We have too elements with the same name : Control.
> it's an Interface in org.apache.ldap.common.message and a class in org.apache.ldap.common.codec
> We must keep only one of those two elements
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Closed: (DIRSNICKERS-124) Control is a Class and an
Interface in two packages.
Posted by "Emmanuel Lecharny (JIRA)" <di...@incubator.apache.org>.
[ http://issues.apache.org/jira/browse/DIRSNICKERS-124?page=all ]
Emmanuel Lecharny closed DIRSNICKERS-124:
-----------------------------------------
Resolution: Duplicate
Assign To: Emmanuel Lecharny (was: Alex Karasulu)
This is a duplicate of DIRLDAP-78.
> Control is a Class and an Interface in two packages.
> ----------------------------------------------------
>
> Key: DIRSNICKERS-124
> URL: http://issues.apache.org/jira/browse/DIRSNICKERS-124
> Project: Directory ASN1
> Type: Improvement
> Reporter: Emmanuel Lecharny
> Assignee: Emmanuel Lecharny
>
> We have too elements with the same name : Control.
> it's an Interface in org.apache.ldap.common.message and a class in org.apache.ldap.common.codec
> We must keep only one of those two elements
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (DIRSNICKERS-124) Control is a Class and an
Interface in two packages.
Posted by "Van Nhu (JIRA)" <di...@incubator.apache.org>.
[ http://issues.apache.org/jira/browse/DIRSNICKERS-124?page=comments#action_12365042 ]
Van Nhu commented on DIRSNICKERS-124:
-------------------------------------
It seems to me that we have two almost identical LDAP message libraries in ldap.common.codec and ldap.common.message with a lot of duplicated code.
This makes the TwixTransformer work double time just to convert a message from one format to another. And currently it converts LDAP requests from the Twix format to the "common" format and converts the LDAP responses from the "common" format to Twix format so that the ApacheDS server can decode the incoming requests and encode the responses before sending them back to the clients.
In addition, the TwixTransformer at the moment doesn't transform a "common" request to Twix request nor does it transform a Twix response to a "common" response. This makes it impossible to use the Twix codec together with MINA to implement an LDAP client or an LDAP proxy that acts like a client to an LDAP Server.
This is not a problem with the old Snickers codec, so I wonder if someone has a plan as how we can clean this up and make the Twix codec support ASN1 encoding of the requests and decoding of the responses. Thanks.
> Control is a Class and an Interface in two packages.
> ----------------------------------------------------
>
> Key: DIRSNICKERS-124
> URL: http://issues.apache.org/jira/browse/DIRSNICKERS-124
> Project: Directory ASN1
> Type: Improvement
> Reporter: Emmanuel Lecharny
> Assignee: Alex Karasulu
>
> We have too elements with the same name : Control.
> it's an Interface in org.apache.ldap.common.message and a class in org.apache.ldap.common.codec
> We must keep only one of those two elements
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (DIRSNICKERS-124) Control is a Class and an
Interface in two packages.
Posted by "Emmanuel Lecharny (JIRA)" <di...@incubator.apache.org>.
[ http://issues.apache.org/jira/browse/DIRSNICKERS-124?page=comments#action_12365055 ]
Emmanuel Lecharny commented on DIRSNICKERS-124:
-----------------------------------------------
The LdapProxy (in sandbox) use the twix codec, so it seems that is is possible to use twix to write a proxy or a client ;-)
The big picture is the following :
1) CLIENT uses twix classes to prepare LdapMessage requests
2) CLIENT sends those messages to the PROXY/SERVER after having encoded them as BER, using twix
3) PROXY/SERVER receives a BER binary encoded data
4) PROXY/SERVER calls the decoder which produce a twix instance of the message
5) PROXY/SERVER then calls the transformer to switch from this twix representation to the internal message representation
6) PROXY/SERVER does it jobs ...
7) PROXY/SERVER creates an instance of the LdapMessage response using the internal representation
8) PROXY/SERVER calls the transformer to switch from the internal representation to the twix representation
9) PROXY/SERVER encodes the message as BER, using twix
10) PROXY/SERVER sends the binary data back to the CLIENT
11) CLIENT decodes the binary data and creates an instance of a twix representation of the message
I must admit that the transformation is a bit overkilling, to say the least, but it does not prevent the implementation of a client or a proxy. The merge between the internal representation and the twix representation is something that is planned in a forthcoming release.
> Control is a Class and an Interface in two packages.
> ----------------------------------------------------
>
> Key: DIRSNICKERS-124
> URL: http://issues.apache.org/jira/browse/DIRSNICKERS-124
> Project: Directory ASN1
> Type: Improvement
> Reporter: Emmanuel Lecharny
> Assignee: Emmanuel Lecharny
>
> We have too elements with the same name : Control.
> it's an Interface in org.apache.ldap.common.message and a class in org.apache.ldap.common.codec
> We must keep only one of those two elements
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (DIRSNICKERS-124) Control is a Class and an
Interface in two packages.
Posted by "Emmanuel Lecharny (JIRA)" <di...@incubator.apache.org>.
[ http://issues.apache.org/jira/browse/DIRSNICKERS-124?page=comments#action_12365244 ]
Emmanuel Lecharny commented on DIRSNICKERS-124:
-----------------------------------------------
Hi Van (if Van is your firstname :),
it would work if you use the twix object instead of the internal object. In you piece of code, just do that :
import org.apache.ldap.common.codec.bind.BindRequest;
public void testEncodeBindRequest() throws EncoderException
{
final BindRequest req0 = new BindRequest();
req0.setMessageId( 1 )
((SimpleAuthentication)req0.getAuthentication()).setSimple( "password".getBytes( "UTF8" ) );
req0.setName( new LdapDN( "cn=admin,dc=example,dc=com" ) );
req0.setVersion( 3 );
try
{
ByteBuffer bb = req0.encode( null );
}
catch ( EncoderException ee )
{
ee.printStackTrace();
fail( ee.getMessage() );
}
}
You will get a bytebuffer with the encoded value to be send to the server.
The twix API is not very confortable atm, but it can evelve in the future.
feel free to contact me directly if you need any information.
> Control is a Class and an Interface in two packages.
> ----------------------------------------------------
>
> Key: DIRSNICKERS-124
> URL: http://issues.apache.org/jira/browse/DIRSNICKERS-124
> Project: Directory ASN1
> Type: Improvement
> Reporter: Emmanuel Lecharny
> Assignee: Emmanuel Lecharny
>
> We have too elements with the same name : Control.
> it's an Interface in org.apache.ldap.common.message and a class in org.apache.ldap.common.codec
> We must keep only one of those two elements
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira