You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by "Pierre-Arnaud Marcelot (JIRA)" <ji...@apache.org> on 2010/06/28 09:45:50 UTC

[jira] Created: (DIRSTUDIO-668) Create an XML Parser/Writer using Dom4J for LDAP Protocol requests/responses

Create an XML Parser/Writer using Dom4J for LDAP Protocol requests/responses
----------------------------------------------------------------------------

                 Key: DIRSTUDIO-668
                 URL: https://issues.apache.org/jira/browse/DIRSTUDIO-668
             Project: Directory Studio
          Issue Type: Task
          Components: studio-proxy
            Reporter: Pierre-Arnaud Marcelot
            Assignee: Keheliya Gallaba


In order to save and read LDAP Protocol requests/responses sent/received in the proxy, an XML Parser/Writer should be implemented using Dom4J.

Here's a sample XML Parser/Writer implementation for connections in the 'connection.core' plugin: 
http://svn.apache.org/repos/asf/directory/studio/tags/1.5.3.v20100330/connection-core/src/main/java/org/apache/directory/studio/connection/core/io/ConnectionIO.java

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DIRSTUDIO-668) Create an XML Parser/Writer using Dom4J for LDAP Protocol requests/responses

Posted by "Stefan Seelmann (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRSTUDIO-668?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12885026#action_12885026 ] 

Stefan Seelmann commented on DIRSTUDIO-668:
-------------------------------------------

Here are my comments:

General notes:
- don't use the implicit toString() method in your write methods. You need to inspect each object and find out the important information. For DN objects the toString() method works, but better use getName() that returns the user provided string.
- to serialize enums you can just use the implicit name() method to get the name of the constant. This name can then be used in the deserialization code to get the enum object from the string: valueOf(String name).
- I don't see that you write controls. But that's not that important for the first shot, you can add them later.

writeBindRequest():
- message.getCredentials() returns an byte[], the toString() method won't work here because it just returns something like "[B@10987197".

writeAddRequest():
- to write the entry you need to extract all attributes from the entry and all values from the attributes. Also note that values can be string or byte[].

writeModifyRequest():
- write the attribute type and all values of each modification item. Note that it is valid that the attribute doesn't contain any value


> Create an XML Parser/Writer using Dom4J for LDAP Protocol requests/responses
> ----------------------------------------------------------------------------
>
>                 Key: DIRSTUDIO-668
>                 URL: https://issues.apache.org/jira/browse/DIRSTUDIO-668
>             Project: Directory Studio
>          Issue Type: Task
>          Components: studio-proxy
>            Reporter: Pierre-Arnaud Marcelot
>            Assignee: Keheliya Gallaba
>
> In order to save and read LDAP Protocol requests/responses sent/received in the proxy, an XML Parser/Writer should be implemented using Dom4J.
> Here's a sample XML Parser/Writer implementation for connections in the 'connection.core' plugin: 
> http://svn.apache.org/repos/asf/directory/studio/tags/1.5.3.v20100330/connection-core/src/main/java/org/apache/directory/studio/connection/core/io/ConnectionIO.java

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DIRSTUDIO-668) Create an XML Parser/Writer using Dom4J for LDAP Protocol requests/responses

Posted by "Pierre-Arnaud Marcelot (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRSTUDIO-668?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12885129#action_12885129 ] 

Pierre-Arnaud Marcelot commented on DIRSTUDIO-668:
--------------------------------------------------

Thanks Stefan for the detailed analysis.

I have nothing more to add to that.

> Create an XML Parser/Writer using Dom4J for LDAP Protocol requests/responses
> ----------------------------------------------------------------------------
>
>                 Key: DIRSTUDIO-668
>                 URL: https://issues.apache.org/jira/browse/DIRSTUDIO-668
>             Project: Directory Studio
>          Issue Type: Task
>          Components: studio-proxy
>            Reporter: Pierre-Arnaud Marcelot
>            Assignee: Keheliya Gallaba
>
> In order to save and read LDAP Protocol requests/responses sent/received in the proxy, an XML Parser/Writer should be implemented using Dom4J.
> Here's a sample XML Parser/Writer implementation for connections in the 'connection.core' plugin: 
> http://svn.apache.org/repos/asf/directory/studio/tags/1.5.3.v20100330/connection-core/src/main/java/org/apache/directory/studio/connection/core/io/ConnectionIO.java

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DIRSTUDIO-668) Create an XML Parser/Writer using Dom4J for LDAP Protocol requests/responses

Posted by "Keheliya Gallaba (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRSTUDIO-668?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12884915#action_12884915 ] 

Keheliya Gallaba commented on DIRSTUDIO-668:
--------------------------------------------

Revision 36 include a skeletal structure and method stubs for reading the XML and converting them to LDAP messages. 
In IRC, it was pointed out that the wrong use of methods in writer part like message.getEntry() and message.getEntryDN() and therefore implicit toString() which will eventually drop important information in the conversion. So I'm working on polishing up the writer methods back again. Please give me more feedback on this as comments for the code at http://code.google.com/p/dirstudio-ldap-proxy/source/browse/trunk/ldap-proxy/ldap-network-server/src/main/java/org/apache/directory/studio/proxy/ProxyIO.java

> Create an XML Parser/Writer using Dom4J for LDAP Protocol requests/responses
> ----------------------------------------------------------------------------
>
>                 Key: DIRSTUDIO-668
>                 URL: https://issues.apache.org/jira/browse/DIRSTUDIO-668
>             Project: Directory Studio
>          Issue Type: Task
>          Components: studio-proxy
>            Reporter: Pierre-Arnaud Marcelot
>            Assignee: Keheliya Gallaba
>
> In order to save and read LDAP Protocol requests/responses sent/received in the proxy, an XML Parser/Writer should be implemented using Dom4J.
> Here's a sample XML Parser/Writer implementation for connections in the 'connection.core' plugin: 
> http://svn.apache.org/repos/asf/directory/studio/tags/1.5.3.v20100330/connection-core/src/main/java/org/apache/directory/studio/connection/core/io/ConnectionIO.java

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DIRSTUDIO-668) Create an XML Parser/Writer using Dom4J for LDAP Protocol requests/responses

Posted by "Keheliya Gallaba (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRSTUDIO-668?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12885387#action_12885387 ] 

Keheliya Gallaba commented on DIRSTUDIO-668:
--------------------------------------------

As commented by Seelmann and Pierre-Arnaud, I fixed all issues of writing byte[],using implicit ToString() etc to prevent missing information when writing all types of LDAP messages to XML except getFilter() method in SearchRequest. Used DSML v2.0 spec where applicable except for Bind Request

> Create an XML Parser/Writer using Dom4J for LDAP Protocol requests/responses
> ----------------------------------------------------------------------------
>
>                 Key: DIRSTUDIO-668
>                 URL: https://issues.apache.org/jira/browse/DIRSTUDIO-668
>             Project: Directory Studio
>          Issue Type: Task
>          Components: studio-proxy
>            Reporter: Pierre-Arnaud Marcelot
>            Assignee: Keheliya Gallaba
>
> In order to save and read LDAP Protocol requests/responses sent/received in the proxy, an XML Parser/Writer should be implemented using Dom4J.
> Here's a sample XML Parser/Writer implementation for connections in the 'connection.core' plugin: 
> http://svn.apache.org/repos/asf/directory/studio/tags/1.5.3.v20100330/connection-core/src/main/java/org/apache/directory/studio/connection/core/io/ConnectionIO.java

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DIRSTUDIO-668) Create an XML Parser/Writer using Dom4J for LDAP Protocol requests/responses

Posted by "Pierre-Arnaud Marcelot (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRSTUDIO-668?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12883055#action_12883055 ] 

Pierre-Arnaud Marcelot commented on DIRSTUDIO-668:
--------------------------------------------------

Of course, the Parser/Writer implementation should come with a variety of unit tests validating the functionalities.

> Create an XML Parser/Writer using Dom4J for LDAP Protocol requests/responses
> ----------------------------------------------------------------------------
>
>                 Key: DIRSTUDIO-668
>                 URL: https://issues.apache.org/jira/browse/DIRSTUDIO-668
>             Project: Directory Studio
>          Issue Type: Task
>          Components: studio-proxy
>            Reporter: Pierre-Arnaud Marcelot
>            Assignee: Keheliya Gallaba
>
> In order to save and read LDAP Protocol requests/responses sent/received in the proxy, an XML Parser/Writer should be implemented using Dom4J.
> Here's a sample XML Parser/Writer implementation for connections in the 'connection.core' plugin: 
> http://svn.apache.org/repos/asf/directory/studio/tags/1.5.3.v20100330/connection-core/src/main/java/org/apache/directory/studio/connection/core/io/ConnectionIO.java

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DIRSTUDIO-668) Create an XML Parser/Writer using Dom4J for LDAP Protocol requests/responses

Posted by "Keheliya Gallaba (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRSTUDIO-668?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12884912#action_12884912 ] 

Keheliya Gallaba commented on DIRSTUDIO-668:
--------------------------------------------

Serializing LDAP messages to XML file has been done. Code is committed to http://code.google.com/p/dirstudio-ldap-proxy/source/browse/trunk/ldap-proxy/ldap-network-server/src/main/java/org/apache/directory/studio/proxy/ProxyIO.java in Revision 35. I'm working on the part for reading XML file and deserializing to LDAP messages part

> Create an XML Parser/Writer using Dom4J for LDAP Protocol requests/responses
> ----------------------------------------------------------------------------
>
>                 Key: DIRSTUDIO-668
>                 URL: https://issues.apache.org/jira/browse/DIRSTUDIO-668
>             Project: Directory Studio
>          Issue Type: Task
>          Components: studio-proxy
>            Reporter: Pierre-Arnaud Marcelot
>            Assignee: Keheliya Gallaba
>
> In order to save and read LDAP Protocol requests/responses sent/received in the proxy, an XML Parser/Writer should be implemented using Dom4J.
> Here's a sample XML Parser/Writer implementation for connections in the 'connection.core' plugin: 
> http://svn.apache.org/repos/asf/directory/studio/tags/1.5.3.v20100330/connection-core/src/main/java/org/apache/directory/studio/connection/core/io/ConnectionIO.java

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.