directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r483139 - in /directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src: main/java/org/apache/directory/ldapstudio/dsmlv2/ test/java/org/apache/directory/ldapstudio/dsmlv2/abandonRequest/ test/java/org/apache/directory/ldapstudio/d...
Date Wed, 06 Dec 2006 16:33:03 GMT
Author: pamarcelot
Date: Wed Dec  6 08:33:02 2006
New Revision: 483139

URL: http://svn.apache.org/viewvc?view=rev&rev=483139
Log:
Resolving a part of the issue DIRSTUDIO-2. Base64 values are now supported in the <controlValue> tag in Control elements.

Added:
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/test/resources/org/apache/directory/ldapstudio/dsmlv2/abandonRequest/request_with_1_control_base64_value.xml
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/test/resources/org/apache/directory/ldapstudio/dsmlv2/addRequest/request_with_1_control_base64_value.xml
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/test/resources/org/apache/directory/ldapstudio/dsmlv2/authRequest/request_with_1_control_base64_value.xml
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/test/resources/org/apache/directory/ldapstudio/dsmlv2/compareRequest/request_with_1_control_base64_value.xml
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/test/resources/org/apache/directory/ldapstudio/dsmlv2/delRequest/request_with_1_control_base64_value.xml
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/test/resources/org/apache/directory/ldapstudio/dsmlv2/extendedRequest/request_with_1_control_base64_value.xml
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/test/resources/org/apache/directory/ldapstudio/dsmlv2/modDNRequest/request_with_1_control_base64_value.xml
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/test/resources/org/apache/directory/ldapstudio/dsmlv2/modifyRequest/request_with_1_control_base64_value.xml
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/test/resources/org/apache/directory/ldapstudio/dsmlv2/searchRequest/request_with_1_control_base64_value.xml
Modified:
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/Dsmlv2Grammar.java
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/test/java/org/apache/directory/ldapstudio/dsmlv2/abandonRequest/AbandonRequestTest.java
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/test/java/org/apache/directory/ldapstudio/dsmlv2/addRequest/AddRequestTest.java
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/test/java/org/apache/directory/ldapstudio/dsmlv2/authRequest/AuthRequestTest.java
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/test/java/org/apache/directory/ldapstudio/dsmlv2/compareRequest/CompareRequestTest.java
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/test/java/org/apache/directory/ldapstudio/dsmlv2/delRequest/DelRequestTest.java
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/test/java/org/apache/directory/ldapstudio/dsmlv2/extendedRequest/ExtendedRequestTest.java
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/test/java/org/apache/directory/ldapstudio/dsmlv2/modDNRequest/ModifyDNRequestTest.java
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/test/java/org/apache/directory/ldapstudio/dsmlv2/modifyRequest/ModifyRequestTest.java
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/test/java/org/apache/directory/ldapstudio/dsmlv2/searchRequest/SearchRequestTest.java

Modified: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/Dsmlv2Grammar.java
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/Dsmlv2Grammar.java?view=diff&rev=483139&r1=483138&r2=483139
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/Dsmlv2Grammar.java (original)
+++ directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/Dsmlv2Grammar.java Wed Dec  6 08:33:02 2006
@@ -67,6 +67,9 @@
  */
 public class Dsmlv2Grammar extends AbstractGrammar implements IGrammar
 {
+    private static final String XML_SCHEMA_URI = "http://www.w3c.org/2001/XMLSchema";
+    private static final String XML_SCHEMA_INSTANCE_URI = "http://www.w3c.org/2001/XMLSchema-instance";
+
     /** The instance of grammar. Dsmlv2Grammar is a singleton */
     private static Dsmlv2Grammar instance = new Dsmlv2Grammar();
 
@@ -2582,11 +2585,20 @@
             XmlPullParser xpp = container.getParser();
             try
             {
+                String typeValue = getXsiTypeAttributeValue( xpp );
+                
                 // Getting the value
                 String nextText = xpp.nextText();
                 if ( !nextText.equals( "" ) )
                 {
-                    control.setControlValue( nextText.trim() );
+                    if ( isBase64BinaryValue( xpp, typeValue ) )
+                    {
+                        control.setControlValue( Base64.decode( nextText.trim().toCharArray() ) );
+                    }
+                    else
+                    {
+                        control.setControlValue( nextText.trim() );
+                    }
                 }
             }
             catch ( IOException e )
@@ -2605,5 +2617,48 @@
     public static Dsmlv2Grammar getInstance()
     {
         return instance;
+    }
+    
+    /**
+     * Returns the value of the attribute 'type' of the "XMLSchema-instance' namespace if it exists
+     *
+     * @param xpp the XPP parser to use
+     * @return the value of the attribute 'type' of the "XMLSchema-instance' namespace if it exists
+     */
+    private String getXsiTypeAttributeValue( XmlPullParser xpp )
+    {
+        String type = null;
+        int nbAttributes = xpp.getAttributeCount();
+        for ( int i = 0; i < nbAttributes; i++ )
+        {
+            // Checking if the attribute 'type' from XML Schema Instance namespace is used.
+            if ( xpp.getAttributeName( i ).equals( "type" ) && xpp.getNamespace( xpp.getAttributePrefix( i ) ).equals( XML_SCHEMA_INSTANCE_URI ))
+            {
+                type = xpp.getAttributeValue( i );
+                break;
+            }
+        }
+        return type;
+    }
+    
+    /**
+     * Returns true if the value of the current tag is Base64Binary encoded
+     *
+     * @param parser the XPP parser to use
+     * @param attrValue the attribute value
+     * @return true if the value of the current tag is Base64BinaryEncoded, false if not
+     */
+    private boolean isBase64BinaryValue( XmlPullParser parser, String attrValue )
+    {
+        if ( attrValue == null )
+        {
+            return false;
+        }
+        // We are looking for something that should look like that: "aNameSpace:base64Binary"
+        // We split the String. The first element should be the namespace prefix and the second "base64Binary"
+        String [] splitedString = attrValue.split( ":" );
+        return ( splitedString.length == 2 ) 
+                && ( XML_SCHEMA_URI.equals( parser.getNamespace( splitedString[0] ) ) ) 
+                && ( "base64Binary".equals( splitedString[1] ) );
     }
 }

Modified: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/test/java/org/apache/directory/ldapstudio/dsmlv2/abandonRequest/AbandonRequestTest.java
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/test/java/org/apache/directory/ldapstudio/dsmlv2/abandonRequest/AbandonRequestTest.java?view=diff&rev=483139&r1=483138&r2=483139
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/test/java/org/apache/directory/ldapstudio/dsmlv2/abandonRequest/AbandonRequestTest.java (original)
+++ directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/test/java/org/apache/directory/ldapstudio/dsmlv2/abandonRequest/AbandonRequestTest.java Wed Dec  6 08:33:02 2006
@@ -115,16 +115,41 @@
         }
 
         AbandonRequest abandonRequest = ( AbandonRequest ) parser.getBatchRequest().getCurrentRequest();
-
+        Control control = abandonRequest.getCurrentControl();
+        
         assertEquals( 1, abandonRequest.getControls().size() );
+        assertTrue( control.getCriticality() );
+        assertEquals( "1.2.840.113556.1.4.643", control.getControlType() );
+        assertEquals( "Some text", StringTools.utf8ToString( ( byte[] ) control.getControlValue() ) );
+    }
+    
+    /**
+     * Test parsing of a request with a (optional) Control element with Base64 value
+     */
+    public void testRequestWith1ControlBase64Value()
+    {
+        Dsmlv2Parser parser = null;
 
-        Control control = abandonRequest.getCurrentControl();
+        try
+        {
+            parser = new Dsmlv2Parser();
 
-        assertTrue( control.getCriticality() );
+            parser.setInputFile( AbandonRequestTest.class.getResource( "request_with_1_control_base64_value.xml" ).getFile() );
 
-        assertEquals( "1.2.840.113556.1.4.643", control.getControlType() );
+            parser.parse();
+        }
+        catch ( Exception e )
+        {
+            fail( e.getMessage() );
+        }
 
-        assertEquals( "Some text", StringTools.utf8ToString( ( byte[] ) control.getControlValue() ) );
+        AbandonRequest abandonRequest = ( AbandonRequest ) parser.getBatchRequest().getCurrentRequest();
+        Control control = abandonRequest.getCurrentControl();
+        
+        assertEquals( 1, abandonRequest.getControls().size() );
+        assertTrue( control.getCriticality() );
+        assertEquals( "1.2.840.113556.1.4.643", control.getControlType() );
+        assertEquals( "DSMLv2.0 rocks!!", StringTools.utf8ToString( ( byte[] ) control.getControlValue() ) );
     }
 
 
@@ -150,15 +175,11 @@
         }
 
         AbandonRequest abandonRequest = ( AbandonRequest ) parser.getBatchRequest().getCurrentRequest();
-
-        assertEquals( 1, abandonRequest.getControls().size() );
-
         Control control = abandonRequest.getCurrentControl();
-
+        
+        assertEquals( 1, abandonRequest.getControls().size() );
         assertTrue( control.getCriticality() );
-
         assertEquals( "1.2.840.113556.1.4.643", control.getControlType() );
-
         assertEquals( StringTools.EMPTY_BYTES, control.getControlValue() );
     }
 
@@ -184,15 +205,11 @@
         }
 
         AbandonRequest abandonRequest = ( AbandonRequest ) parser.getBatchRequest().getCurrentRequest();
-
-        assertEquals( 2, abandonRequest.getControls().size() );
-
         Control control = abandonRequest.getCurrentControl();
-
+        
+        assertEquals( 2, abandonRequest.getControls().size() );
         assertFalse( control.getCriticality() );
-
         assertEquals( "1.2.840.113556.1.4.789", control.getControlType() );
-
         assertEquals( "Some other text", StringTools.utf8ToString( ( byte[] ) control.getControlValue() ) );
     }
 
@@ -219,15 +236,11 @@
         }
 
         AbandonRequest abandonRequest = ( AbandonRequest ) parser.getBatchRequest().getCurrentRequest();
-
-        assertEquals( 3, abandonRequest.getControls().size() );
-
         Control control = abandonRequest.getCurrentControl();
-
+        
+        assertEquals( 3, abandonRequest.getControls().size() );
         assertTrue( control.getCriticality() );
-
         assertEquals( "1.2.840.113556.1.4.456", control.getControlType() );
-
         assertEquals( StringTools.EMPTY_BYTES, control.getControlValue() );
     }
 }

Modified: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/test/java/org/apache/directory/ldapstudio/dsmlv2/addRequest/AddRequestTest.java
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/test/java/org/apache/directory/ldapstudio/dsmlv2/addRequest/AddRequestTest.java?view=diff&rev=483139&r1=483138&r2=483139
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/test/java/org/apache/directory/ldapstudio/dsmlv2/addRequest/AddRequestTest.java (original)
+++ directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/test/java/org/apache/directory/ldapstudio/dsmlv2/addRequest/AddRequestTest.java Wed Dec  6 08:33:02 2006
@@ -128,6 +128,34 @@
 
         assertEquals( "Some text", StringTools.utf8ToString( ( byte[] ) control.getControlValue() ) );
     }
+    
+    /**
+     * Test parsing of a request with a (optional) Control element with Base64 value
+     */
+    public void testRequestWith1ControlBase64Value()
+    {
+        Dsmlv2Parser parser = null;
+        try
+        {
+            parser = new Dsmlv2Parser();
+
+            parser.setInputFile( AddRequestTest.class.getResource( "request_with_1_control_base64_value.xml" ).getFile() );
+
+            parser.parse();
+        }
+        catch ( Exception e )
+        {
+            fail( e.getMessage() );
+        }
+
+        AddRequest addRequest = ( AddRequest ) parser.getBatchRequest().getCurrentRequest();
+        Control control = addRequest.getCurrentControl();
+        
+        assertEquals( 1, addRequest.getControls().size() );
+        assertTrue( control.getCriticality() );
+        assertEquals( "1.2.840.113556.1.4.643", control.getControlType() );
+        assertEquals( "DSMLv2.0 rocks!!", StringTools.utf8ToString( ( byte[] ) control.getControlValue() ) );
+    }
 
 
     /**
@@ -151,15 +179,11 @@
         }
 
         AddRequest addRequest = ( AddRequest ) parser.getBatchRequest().getCurrentRequest();
-
-        assertEquals( 1, addRequest.getControls().size() );
-
         Control control = addRequest.getCurrentControl();
-
+        
+        assertEquals( 1, addRequest.getControls().size() );
         assertTrue( control.getCriticality() );
-
         assertEquals( "1.2.840.113556.1.4.643", control.getControlType() );
-
         assertEquals( StringTools.EMPTY_BYTES, control.getControlValue() );
     }
 
@@ -184,15 +208,11 @@
         }
 
         AddRequest addRequest = ( AddRequest ) parser.getBatchRequest().getCurrentRequest();
-
-        assertEquals( 2, addRequest.getControls().size() );
-
         Control control = addRequest.getCurrentControl();
 
+        assertEquals( 2, addRequest.getControls().size() );
         assertFalse( control.getCriticality() );
-
         assertEquals( "1.2.840.113556.1.4.789", control.getControlType() );
-
         assertEquals( "Some other text", StringTools.utf8ToString( ( byte[] ) control.getControlValue() ) );
     }
 
@@ -218,15 +238,11 @@
         }
 
         AddRequest addRequest = ( AddRequest ) parser.getBatchRequest().getCurrentRequest();
-
-        assertEquals( 3, addRequest.getControls().size() );
-
         Control control = addRequest.getCurrentControl();
 
+        assertEquals( 3, addRequest.getControls().size() );
         assertTrue( control.getCriticality() );
-
         assertEquals( "1.2.840.113556.1.4.456", control.getControlType() );
-
         assertEquals( StringTools.EMPTY_BYTES, control.getControlValue() );
     }
 

Modified: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/test/java/org/apache/directory/ldapstudio/dsmlv2/authRequest/AuthRequestTest.java
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/test/java/org/apache/directory/ldapstudio/dsmlv2/authRequest/AuthRequestTest.java?view=diff&rev=483139&r1=483138&r2=483139
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/test/java/org/apache/directory/ldapstudio/dsmlv2/authRequest/AuthRequestTest.java (original)
+++ directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/test/java/org/apache/directory/ldapstudio/dsmlv2/authRequest/AuthRequestTest.java Wed Dec  6 08:33:02 2006
@@ -112,16 +112,40 @@
         }
 
         BindRequest abandonRequest = ( BindRequest ) parser.getBatchRequest().getCurrentRequest();
-
+        Control control = abandonRequest.getCurrentControl();
+        
         assertEquals( 1, abandonRequest.getControls().size() );
+        assertTrue( control.getCriticality() );
+        assertEquals( "1.2.840.113556.1.4.643", control.getControlType() );
+        assertEquals( "Some text", StringTools.utf8ToString( ( byte[] ) control.getControlValue() ) );
+    }
+    
+    /**
+     * Test parsing of a request with a (optional) Control element with Base64 value
+     */
+    public void testRequestWith1ControlBase64Value()
+    {
+        Dsmlv2Parser parser = null;
+        try
+        {
+            parser = new Dsmlv2Parser();
 
-        Control control = abandonRequest.getCurrentControl();
+            parser.setInputFile( AuthRequestTest.class.getResource( "request_with_1_control_base64_value.xml" ).getFile() );
 
-        assertTrue( control.getCriticality() );
+            parser.parse();
+        }
+        catch ( Exception e )
+        {
+            fail( e.getMessage() );
+        }
 
+        BindRequest abandonRequest = ( BindRequest ) parser.getBatchRequest().getCurrentRequest();
+        Control control = abandonRequest.getCurrentControl();
+        
+        assertEquals( 1, abandonRequest.getControls().size() );
+        assertTrue( control.getCriticality() );
         assertEquals( "1.2.840.113556.1.4.643", control.getControlType() );
-
-        assertEquals( "Some text", StringTools.utf8ToString( ( byte[] ) control.getControlValue() ) );
+        assertEquals( "DSMLv2.0 rocks!!", StringTools.utf8ToString( ( byte[] ) control.getControlValue() ) );
     }
 
 
@@ -146,15 +170,11 @@
         }
 
         BindRequest abandonRequest = ( BindRequest ) parser.getBatchRequest().getCurrentRequest();
-
-        assertEquals( 1, abandonRequest.getControls().size() );
-
         Control control = abandonRequest.getCurrentControl();
-
+        
+        assertEquals( 1, abandonRequest.getControls().size() );
         assertTrue( control.getCriticality() );
-
         assertEquals( "1.2.840.113556.1.4.643", control.getControlType() );
-
         assertEquals( StringTools.EMPTY_BYTES, control.getControlValue() );
     }
 
@@ -179,15 +199,11 @@
         }
 
         BindRequest abandonRequest = ( BindRequest ) parser.getBatchRequest().getCurrentRequest();
-
-        assertEquals( 2, abandonRequest.getControls().size() );
-
         Control control = abandonRequest.getCurrentControl();
-
+        
+        assertEquals( 2, abandonRequest.getControls().size() );
         assertFalse( control.getCriticality() );
-
         assertEquals( "1.2.840.113556.1.4.789", control.getControlType() );
-
         assertEquals( "Some other text", StringTools.utf8ToString( ( byte[] ) control.getControlValue() ) );
     }
 
@@ -213,15 +229,11 @@
         }
 
         BindRequest abandonRequest = ( BindRequest ) parser.getBatchRequest().getCurrentRequest();
-
-        assertEquals( 3, abandonRequest.getControls().size() );
-
         Control control = abandonRequest.getCurrentControl();
-
+        
+        assertEquals( 3, abandonRequest.getControls().size() );
         assertTrue( control.getCriticality() );
-
         assertEquals( "1.2.840.113556.1.4.456", control.getControlType() );
-
         assertEquals( StringTools.EMPTY_BYTES, control.getControlValue() );
     }
 }

Modified: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/test/java/org/apache/directory/ldapstudio/dsmlv2/compareRequest/CompareRequestTest.java
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/test/java/org/apache/directory/ldapstudio/dsmlv2/compareRequest/CompareRequestTest.java?view=diff&rev=483139&r1=483138&r2=483139
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/test/java/org/apache/directory/ldapstudio/dsmlv2/compareRequest/CompareRequestTest.java (original)
+++ directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/test/java/org/apache/directory/ldapstudio/dsmlv2/compareRequest/CompareRequestTest.java Wed Dec  6 08:33:02 2006
@@ -124,6 +124,38 @@
 
         assertEquals( "Some text", StringTools.utf8ToString( ( byte[] ) control.getControlValue() ) );
     }
+    
+    /**
+     * Test parsing of a request with a (optional) Control element with Base64 value
+     */
+    public void testRequestWith1ControlBase64Value()
+    {
+        Dsmlv2Parser parser = null;
+        try
+        {
+            parser = new Dsmlv2Parser();
+
+            parser.setInputFile( CompareRequestTest.class.getResource( "request_with_1_control.xml" ).getFile() );
+
+            parser.parse();
+        }
+        catch ( Exception e )
+        {
+            fail( e.getMessage() );
+        }
+
+        CompareRequest compareRequest = ( CompareRequest ) parser.getBatchRequest().getCurrentRequest();
+
+        assertEquals( 1, compareRequest.getControls().size() );
+
+        Control control = compareRequest.getCurrentControl();
+
+        assertTrue( control.getCriticality() );
+
+        assertEquals( "1.2.840.113556.1.4.643", control.getControlType() );
+
+        assertEquals( "Some text", StringTools.utf8ToString( ( byte[] ) control.getControlValue() ) );
+    }
 
 
     /**

Modified: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/test/java/org/apache/directory/ldapstudio/dsmlv2/delRequest/DelRequestTest.java
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/test/java/org/apache/directory/ldapstudio/dsmlv2/delRequest/DelRequestTest.java?view=diff&rev=483139&r1=483138&r2=483139
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/test/java/org/apache/directory/ldapstudio/dsmlv2/delRequest/DelRequestTest.java (original)
+++ directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/test/java/org/apache/directory/ldapstudio/dsmlv2/delRequest/DelRequestTest.java Wed Dec  6 08:33:02 2006
@@ -112,16 +112,40 @@
         }
 
         DelRequest delRequest = ( DelRequest ) parser.getBatchRequest().getCurrentRequest();
-
+        Control control = delRequest.getCurrentControl();
+        
         assertEquals( 1, delRequest.getControls().size() );
+        assertTrue( control.getCriticality() );
+        assertEquals( "1.2.840.113556.1.4.643", control.getControlType() );
+        assertEquals( "Some text", StringTools.utf8ToString( ( byte[] ) control.getControlValue() ) );
+    }
+    
+    /**
+     * Test parsing of a request with a (optional) Control element
+     */
+    public void testRequestWith1ControlBase64Value()
+    {
+        Dsmlv2Parser parser = null;
+        try
+        {
+            parser = new Dsmlv2Parser();
 
-        Control control = delRequest.getCurrentControl();
+            parser.setInputFile( DelRequestTest.class.getResource( "request_with_1_control_base64_value.xml" ).getFile() );
 
-        assertTrue( control.getCriticality() );
+            parser.parse();
+        }
+        catch ( Exception e )
+        {
+            fail( e.getMessage() );
+        }
 
+        DelRequest delRequest = ( DelRequest ) parser.getBatchRequest().getCurrentRequest();
+        Control control = delRequest.getCurrentControl();
+        
+        assertEquals( 1, delRequest.getControls().size() );
+        assertTrue( control.getCriticality() );
         assertEquals( "1.2.840.113556.1.4.643", control.getControlType() );
-
-        assertEquals( "Some text", StringTools.utf8ToString( ( byte[] ) control.getControlValue() ) );
+        assertEquals( "DSMLv2.0 rocks!!", StringTools.utf8ToString( ( byte[] ) control.getControlValue() ) );
     }
 
 
@@ -146,15 +170,11 @@
         }
 
         DelRequest delRequest = ( DelRequest ) parser.getBatchRequest().getCurrentRequest();
-
-        assertEquals( 1, delRequest.getControls().size() );
-
         Control control = delRequest.getCurrentControl();
-
+        
+        assertEquals( 1, delRequest.getControls().size() );
         assertTrue( control.getCriticality() );
-
         assertEquals( "1.2.840.113556.1.4.643", control.getControlType() );
-
         assertEquals( StringTools.EMPTY_BYTES, control.getControlValue() );
     }
 
@@ -179,15 +199,11 @@
         }
 
         DelRequest delRequest = ( DelRequest ) parser.getBatchRequest().getCurrentRequest();
-
-        assertEquals( 2, delRequest.getControls().size() );
-
         Control control = delRequest.getCurrentControl();
-
+        
+        assertEquals( 2, delRequest.getControls().size() );
         assertFalse( control.getCriticality() );
-
         assertEquals( "1.2.840.113556.1.4.789", control.getControlType() );
-
         assertEquals( "Some other text", StringTools.utf8ToString( ( byte[] ) control.getControlValue() ) );
     }
 
@@ -213,15 +229,11 @@
         }
 
         DelRequest delRequest = ( DelRequest ) parser.getBatchRequest().getCurrentRequest();
-
-        assertEquals( 3, delRequest.getControls().size() );
-
         Control control = delRequest.getCurrentControl();
-
+        
+        assertEquals( 3, delRequest.getControls().size() );
         assertTrue( control.getCriticality() );
-
         assertEquals( "1.2.840.113556.1.4.456", control.getControlType() );
-
         assertEquals( StringTools.EMPTY_BYTES, control.getControlValue() );
     }
 }

Modified: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/test/java/org/apache/directory/ldapstudio/dsmlv2/extendedRequest/ExtendedRequestTest.java
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/test/java/org/apache/directory/ldapstudio/dsmlv2/extendedRequest/ExtendedRequestTest.java?view=diff&rev=483139&r1=483138&r2=483139
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/test/java/org/apache/directory/ldapstudio/dsmlv2/extendedRequest/ExtendedRequestTest.java (original)
+++ directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/test/java/org/apache/directory/ldapstudio/dsmlv2/extendedRequest/ExtendedRequestTest.java Wed Dec  6 08:33:02 2006
@@ -79,16 +79,40 @@
         }
 
         ExtendedRequest extendedRequest = ( ExtendedRequest ) parser.getBatchRequest().getCurrentRequest();
+        Control control = extendedRequest.getCurrentControl();
 
         assertEquals( 1, extendedRequest.getControls().size() );
+        assertTrue( control.getCriticality() );
+        assertEquals( "1.2.840.113556.1.4.643", control.getControlType() );
+        assertEquals( "Some text", StringTools.utf8ToString( ( byte[] ) control.getControlValue() ) );
+    }
+    
+    /**
+     * Test parsing of a request with a (optional) Control element with Base64 value
+     */
+    public void testRequestWith1ControlBase64Value()
+    {
+        Dsmlv2Parser parser = null;
+        try
+        {
+            parser = new Dsmlv2Parser();
 
-        Control control = extendedRequest.getCurrentControl();
+            parser.setInputFile( ExtendedRequestTest.class.getResource( "request_with_1_control_base64_value.xml" ).getFile() );
 
-        assertTrue( control.getCriticality() );
+            parser.parse();
+        }
+        catch ( Exception e )
+        {
+            fail( e.getMessage() );
+        }
 
+        ExtendedRequest extendedRequest = ( ExtendedRequest ) parser.getBatchRequest().getCurrentRequest();
+        Control control = extendedRequest.getCurrentControl();
+        
+        assertEquals( 1, extendedRequest.getControls().size() );
+        assertTrue( control.getCriticality() );
         assertEquals( "1.2.840.113556.1.4.643", control.getControlType() );
-
-        assertEquals( "Some text", StringTools.utf8ToString( ( byte[] ) control.getControlValue() ) );
+        assertEquals( "DSMLv2.0 rocks!!", StringTools.utf8ToString( ( byte[] ) control.getControlValue() ) );
     }
 
 
@@ -113,15 +137,11 @@
         }
 
         ExtendedRequest extendedRequest = ( ExtendedRequest ) parser.getBatchRequest().getCurrentRequest();
-
-        assertEquals( 1, extendedRequest.getControls().size() );
-
         Control control = extendedRequest.getCurrentControl();
-
+        
+        assertEquals( 1, extendedRequest.getControls().size() );
         assertTrue( control.getCriticality() );
-
         assertEquals( "1.2.840.113556.1.4.643", control.getControlType() );
-
         assertEquals( StringTools.EMPTY_BYTES, control.getControlValue() );
     }
 
@@ -146,15 +166,11 @@
         }
 
         ExtendedRequest extendedRequest = ( ExtendedRequest ) parser.getBatchRequest().getCurrentRequest();
-
-        assertEquals( 2, extendedRequest.getControls().size() );
-
         Control control = extendedRequest.getCurrentControl();
 
+        assertEquals( 2, extendedRequest.getControls().size() );
         assertFalse( control.getCriticality() );
-
         assertEquals( "1.2.840.113556.1.4.789", control.getControlType() );
-
         assertEquals( "Some other text", StringTools.utf8ToString( ( byte[] ) control.getControlValue() ) );
     }
 
@@ -180,15 +196,11 @@
         }
 
         ExtendedRequest extendedRequest = ( ExtendedRequest ) parser.getBatchRequest().getCurrentRequest();
-
-        assertEquals( 3, extendedRequest.getControls().size() );
-
         Control control = extendedRequest.getCurrentControl();
-
+        
+        assertEquals( 3, extendedRequest.getControls().size() );
         assertTrue( control.getCriticality() );
-
         assertEquals( "1.2.840.113556.1.4.456", control.getControlType() );
-
         assertEquals( StringTools.EMPTY_BYTES, control.getControlValue() );
     }
 

Modified: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/test/java/org/apache/directory/ldapstudio/dsmlv2/modDNRequest/ModifyDNRequestTest.java
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/test/java/org/apache/directory/ldapstudio/dsmlv2/modDNRequest/ModifyDNRequestTest.java?view=diff&rev=483139&r1=483138&r2=483139
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/test/java/org/apache/directory/ldapstudio/dsmlv2/modDNRequest/ModifyDNRequestTest.java (original)
+++ directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/test/java/org/apache/directory/ldapstudio/dsmlv2/modDNRequest/ModifyDNRequestTest.java Wed Dec  6 08:33:02 2006
@@ -79,16 +79,40 @@
         }
 
         ModifyDNRequest modifyDNRequest = ( ModifyDNRequest ) parser.getBatchRequest().getCurrentRequest();
-
+        Control control = modifyDNRequest.getCurrentControl();
+        
         assertEquals( 1, modifyDNRequest.getControls().size() );
+        assertTrue( control.getCriticality() );
+        assertEquals( "1.2.840.113556.1.4.643", control.getControlType() );
+        assertEquals( "Some text", StringTools.utf8ToString( ( byte[] ) control.getControlValue() ) );
+    }
+    
+    /**
+     * Test parsing of a request with a (optional) Control element with Base64 Value
+     */
+    public void testRequestWith1ControlBase64Value()
+    {
+        Dsmlv2Parser parser = null;
+        try
+        {
+            parser = new Dsmlv2Parser();
 
-        Control control = modifyDNRequest.getCurrentControl();
+            parser.setInputFile( ModifyDNRequestTest.class.getResource( "request_with_1_control_base64_value.xml" ).getFile() );
 
-        assertTrue( control.getCriticality() );
+            parser.parse();
+        }
+        catch ( Exception e )
+        {
+            fail( e.getMessage() );
+        }
 
+        ModifyDNRequest modifyDNRequest = ( ModifyDNRequest ) parser.getBatchRequest().getCurrentRequest();
+        Control control = modifyDNRequest.getCurrentControl();
+        
+        assertEquals( 1, modifyDNRequest.getControls().size() );
+        assertTrue( control.getCriticality() );
         assertEquals( "1.2.840.113556.1.4.643", control.getControlType() );
-
-        assertEquals( "Some text", StringTools.utf8ToString( ( byte[] ) control.getControlValue() ) );
+        assertEquals( "DSMLv2.0 rocks!!", StringTools.utf8ToString( ( byte[] ) control.getControlValue() ) );
     }
 
 
@@ -113,15 +137,11 @@
         }
 
         ModifyDNRequest modifyDNRequest = ( ModifyDNRequest ) parser.getBatchRequest().getCurrentRequest();
-
-        assertEquals( 1, modifyDNRequest.getControls().size() );
-
         Control control = modifyDNRequest.getCurrentControl();
-
+        
+        assertEquals( 1, modifyDNRequest.getControls().size() );
         assertTrue( control.getCriticality() );
-
         assertEquals( "1.2.840.113556.1.4.643", control.getControlType() );
-
         assertEquals( StringTools.EMPTY_BYTES, control.getControlValue() );
     }
 
@@ -146,15 +166,11 @@
         }
 
         ModifyDNRequest modifyDNRequest = ( ModifyDNRequest ) parser.getBatchRequest().getCurrentRequest();
-
-        assertEquals( 2, modifyDNRequest.getControls().size() );
-
         Control control = modifyDNRequest.getCurrentControl();
-
+        
+        assertEquals( 2, modifyDNRequest.getControls().size() );
         assertFalse( control.getCriticality() );
-
         assertEquals( "1.2.840.113556.1.4.789", control.getControlType() );
-
         assertEquals( "Some other text", StringTools.utf8ToString( ( byte[] ) control.getControlValue() ) );
     }
 
@@ -180,15 +196,11 @@
         }
 
         ModifyDNRequest modifyDNRequest = ( ModifyDNRequest ) parser.getBatchRequest().getCurrentRequest();
-
-        assertEquals( 3, modifyDNRequest.getControls().size() );
-
         Control control = modifyDNRequest.getCurrentControl();
-
+        
+        assertEquals( 3, modifyDNRequest.getControls().size() );
         assertTrue( control.getCriticality() );
-
         assertEquals( "1.2.840.113556.1.4.456", control.getControlType() );
-
         assertEquals( StringTools.EMPTY_BYTES, control.getControlValue() );
     }
 

Modified: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/test/java/org/apache/directory/ldapstudio/dsmlv2/modifyRequest/ModifyRequestTest.java
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/test/java/org/apache/directory/ldapstudio/dsmlv2/modifyRequest/ModifyRequestTest.java?view=diff&rev=483139&r1=483138&r2=483139
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/test/java/org/apache/directory/ldapstudio/dsmlv2/modifyRequest/ModifyRequestTest.java (original)
+++ directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/test/java/org/apache/directory/ldapstudio/dsmlv2/modifyRequest/ModifyRequestTest.java Wed Dec  6 08:33:02 2006
@@ -86,16 +86,40 @@
         }
 
         ModifyRequest modifyRequest = ( ModifyRequest ) parser.getBatchRequest().getCurrentRequest();
-
+        Control control = modifyRequest.getCurrentControl();
+        
         assertEquals( 1, modifyRequest.getControls().size() );
+        assertTrue( control.getCriticality() );
+        assertEquals( "1.2.840.113556.1.4.643", control.getControlType() );
+        assertEquals( "Some text", StringTools.utf8ToString( ( byte[] ) control.getControlValue() ) );
+    }
+    
+    /**
+     * Test parsing of a request with a (optional) Control element with Base64 Value
+     */
+    public void testRequestWith1ControlBase64Value()
+    {
+        Dsmlv2Parser parser = null;
+        try
+        {
+            parser = new Dsmlv2Parser();
 
-        Control control = modifyRequest.getCurrentControl();
+            parser.setInputFile( ModifyRequestTest.class.getResource( "request_with_1_control_base64_value.xml" ).getFile() );
 
-        assertTrue( control.getCriticality() );
+            parser.parse();
+        }
+        catch ( Exception e )
+        {
+            fail( e.getMessage() );
+        }
 
+        ModifyRequest modifyRequest = ( ModifyRequest ) parser.getBatchRequest().getCurrentRequest();
+        Control control = modifyRequest.getCurrentControl();
+        
+        assertEquals( 1, modifyRequest.getControls().size() );
+        assertTrue( control.getCriticality() );
         assertEquals( "1.2.840.113556.1.4.643", control.getControlType() );
-
-        assertEquals( "Some text", StringTools.utf8ToString( ( byte[] ) control.getControlValue() ) );
+        assertEquals( "DSMLv2.0 rocks!!", StringTools.utf8ToString( ( byte[] ) control.getControlValue() ) );
     }
 
 
@@ -120,15 +144,11 @@
         }
 
         ModifyRequest modifyRequest = ( ModifyRequest ) parser.getBatchRequest().getCurrentRequest();
-
-        assertEquals( 1, modifyRequest.getControls().size() );
-
         Control control = modifyRequest.getCurrentControl();
-
+        
+        assertEquals( 1, modifyRequest.getControls().size() );
         assertTrue( control.getCriticality() );
-
         assertEquals( "1.2.840.113556.1.4.643", control.getControlType() );
-
         assertEquals( StringTools.EMPTY_BYTES, control.getControlValue() );
     }
 
@@ -153,15 +173,11 @@
         }
 
         ModifyRequest modifyRequest = ( ModifyRequest ) parser.getBatchRequest().getCurrentRequest();
-
-        assertEquals( 2, modifyRequest.getControls().size() );
-
         Control control = modifyRequest.getCurrentControl();
-
+        
+        assertEquals( 2, modifyRequest.getControls().size() );
         assertFalse( control.getCriticality() );
-
         assertEquals( "1.2.840.113556.1.4.789", control.getControlType() );
-
         assertEquals( "Some other text", StringTools.utf8ToString( ( byte[] ) control.getControlValue() ) );
     }
 
@@ -187,15 +203,11 @@
         }
 
         ModifyRequest modifyRequest = ( ModifyRequest ) parser.getBatchRequest().getCurrentRequest();
-
-        assertEquals( 3, modifyRequest.getControls().size() );
-
         Control control = modifyRequest.getCurrentControl();
-
+        
+        assertEquals( 3, modifyRequest.getControls().size() );
         assertTrue( control.getCriticality() );
-
         assertEquals( "1.2.840.113556.1.4.456", control.getControlType() );
-
         assertEquals( StringTools.EMPTY_BYTES, control.getControlValue() );
     }
 

Modified: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/test/java/org/apache/directory/ldapstudio/dsmlv2/searchRequest/SearchRequestTest.java
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/test/java/org/apache/directory/ldapstudio/dsmlv2/searchRequest/SearchRequestTest.java?view=diff&rev=483139&r1=483138&r2=483139
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/test/java/org/apache/directory/ldapstudio/dsmlv2/searchRequest/SearchRequestTest.java (original)
+++ directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/test/java/org/apache/directory/ldapstudio/dsmlv2/searchRequest/SearchRequestTest.java Wed Dec  6 08:33:02 2006
@@ -130,16 +130,40 @@
         }
 
         SearchRequest searchRequest = ( SearchRequest ) parser.getBatchRequest().getCurrentRequest();
-
+        Control control = searchRequest.getCurrentControl();
+        
         assertEquals( 1, searchRequest.getControls().size() );
+        assertTrue( control.getCriticality() );
+        assertEquals( "1.2.840.113556.1.4.643", control.getControlType() );
+        assertEquals( "Some text", StringTools.utf8ToString( ( byte[] ) control.getControlValue() ) );
+    }
+    
+    /**
+     * Test parsing of a request with a (optional) Control element with Base64 value
+     */
+    public void testRequestWith1ControlBase64Value()
+    {
+        Dsmlv2Parser parser = null;
+        try
+        {
+            parser = new Dsmlv2Parser();
 
-        Control control = searchRequest.getCurrentControl();
+            parser.setInputFile( SearchRequestTest.class.getResource( "request_with_1_control_base64_value.xml" ).getFile() );
 
-        assertTrue( control.getCriticality() );
+            parser.parse();
+        }
+        catch ( Exception e )
+        {
+            fail( e.getMessage() );
+        }
 
+        SearchRequest searchRequest = ( SearchRequest ) parser.getBatchRequest().getCurrentRequest();
+        Control control = searchRequest.getCurrentControl();
+        
+        assertEquals( 1, searchRequest.getControls().size() );
+        assertTrue( control.getCriticality() );
         assertEquals( "1.2.840.113556.1.4.643", control.getControlType() );
-
-        assertEquals( "Some text", StringTools.utf8ToString( ( byte[] ) control.getControlValue() ) );
+        assertEquals( "DSMLv2.0 rocks!!", StringTools.utf8ToString( ( byte[] ) control.getControlValue() ) );
     }
 
 
@@ -164,15 +188,11 @@
         }
 
         SearchRequest searchRequest = ( SearchRequest ) parser.getBatchRequest().getCurrentRequest();
-
-        assertEquals( 1, searchRequest.getControls().size() );
-
         Control control = searchRequest.getCurrentControl();
-
+        
+        assertEquals( 1, searchRequest.getControls().size() );
         assertTrue( control.getCriticality() );
-
         assertEquals( "1.2.840.113556.1.4.643", control.getControlType() );
-
         assertEquals( StringTools.EMPTY_BYTES, control.getControlValue() );
     }
 
@@ -197,15 +217,11 @@
         }
 
         SearchRequest searchRequest = ( SearchRequest ) parser.getBatchRequest().getCurrentRequest();
-
-        assertEquals( 2, searchRequest.getControls().size() );
-
         Control control = searchRequest.getCurrentControl();
-
+        
+        assertEquals( 2, searchRequest.getControls().size() );
         assertFalse( control.getCriticality() );
-
         assertEquals( "1.2.840.113556.1.4.789", control.getControlType() );
-
         assertEquals( "Some other text", StringTools.utf8ToString( ( byte[] ) control.getControlValue() ) );
     }
 
@@ -231,15 +247,11 @@
         }
 
         SearchRequest searchRequest = ( SearchRequest ) parser.getBatchRequest().getCurrentRequest();
-
-        assertEquals( 3, searchRequest.getControls().size() );
-
         Control control = searchRequest.getCurrentControl();
-
+        
+        assertEquals( 3, searchRequest.getControls().size() );
         assertTrue( control.getCriticality() );
-
         assertEquals( "1.2.840.113556.1.4.456", control.getControlType() );
-
         assertEquals( StringTools.EMPTY_BYTES, control.getControlValue() );
     }
 

Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/test/resources/org/apache/directory/ldapstudio/dsmlv2/abandonRequest/request_with_1_control_base64_value.xml
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/test/resources/org/apache/directory/ldapstudio/dsmlv2/abandonRequest/request_with_1_control_base64_value.xml?view=auto&rev=483139
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/test/resources/org/apache/directory/ldapstudio/dsmlv2/abandonRequest/request_with_1_control_base64_value.xml (added)
+++ directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/test/resources/org/apache/directory/ldapstudio/dsmlv2/abandonRequest/request_with_1_control_base64_value.xml Wed Dec  6 08:33:02 2006
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<batchRequest xmlns="urn:oasis:names:tc:DSML:2.0:core"
+              xmlns:xsi="http://www.w3c.org/2001/XMLSchema-instance"
+              xmlns:xsd="http://www.w3c.org/2001/XMLSchema">
+	<abandonRequest abandonID="123">
+		<control type="1.2.840.113556.1.4.643" criticality="true">
+			<controlValue xsi:type="xsd:base64Binary">RFNNTHYyLjAgcm9ja3MhIQ==</controlValue>
+		</control>
+	</abandonRequest>
+</batchRequest>
\ No newline at end of file

Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/test/resources/org/apache/directory/ldapstudio/dsmlv2/addRequest/request_with_1_control_base64_value.xml
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/test/resources/org/apache/directory/ldapstudio/dsmlv2/addRequest/request_with_1_control_base64_value.xml?view=auto&rev=483139
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/test/resources/org/apache/directory/ldapstudio/dsmlv2/addRequest/request_with_1_control_base64_value.xml (added)
+++ directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/test/resources/org/apache/directory/ldapstudio/dsmlv2/addRequest/request_with_1_control_base64_value.xml Wed Dec  6 08:33:02 2006
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<batchRequest xmlns="urn:oasis:names:tc:DSML:2.0:core"
+              xmlns:xsi="http://www.w3c.org/2001/XMLSchema-instance"
+              xmlns:xsd="http://www.w3c.org/2001/XMLSchema">
+	<addRequest dn="CN=Bob Rush,OU=Dev,DC=Example,DC=COM">
+		<control type="1.2.840.113556.1.4.643" criticality="true">
+			<controlValue xsi:type="xsd:base64Binary">RFNNTHYyLjAgcm9ja3MhIQ==</controlValue>
+		</control>
+	</addRequest>
+</batchRequest>
\ No newline at end of file

Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/test/resources/org/apache/directory/ldapstudio/dsmlv2/authRequest/request_with_1_control_base64_value.xml
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/test/resources/org/apache/directory/ldapstudio/dsmlv2/authRequest/request_with_1_control_base64_value.xml?view=auto&rev=483139
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/test/resources/org/apache/directory/ldapstudio/dsmlv2/authRequest/request_with_1_control_base64_value.xml (added)
+++ directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/test/resources/org/apache/directory/ldapstudio/dsmlv2/authRequest/request_with_1_control_base64_value.xml Wed Dec  6 08:33:02 2006
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<batchRequest xmlns="urn:oasis:names:tc:DSML:2.0:core"
+              xmlns:xsi="http://www.w3c.org/2001/XMLSchema-instance"
+              xmlns:xsd="http://www.w3c.org/2001/XMLSchema">
+	<authRequest principal="CN=Bob Rush,OU=Dev,DC=Example,DC=COM">
+		<control type="1.2.840.113556.1.4.643" criticality="true">
+			<controlValue xsi:type="xsd:base64Binary">RFNNTHYyLjAgcm9ja3MhIQ==</controlValue>
+		</control>
+	</authRequest>
+</batchRequest>
\ No newline at end of file

Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/test/resources/org/apache/directory/ldapstudio/dsmlv2/compareRequest/request_with_1_control_base64_value.xml
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/test/resources/org/apache/directory/ldapstudio/dsmlv2/compareRequest/request_with_1_control_base64_value.xml?view=auto&rev=483139
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/test/resources/org/apache/directory/ldapstudio/dsmlv2/compareRequest/request_with_1_control_base64_value.xml (added)
+++ directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/test/resources/org/apache/directory/ldapstudio/dsmlv2/compareRequest/request_with_1_control_base64_value.xml Wed Dec  6 08:33:02 2006
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<batchRequest xmlns="urn:oasis:names:tc:DSML:2.0:core"
+              xmlns:xsi="http://www.w3c.org/2001/XMLSchema-instance"
+              xmlns:xsd="http://www.w3c.org/2001/XMLSchema">
+	<compareRequest dn="CN=Bob Rush,OU=Dev,DC=Example,DC=COM">
+		<control type="1.2.840.113556.1.4.643" criticality="true">
+			<controlValue xsi:type="xsd:base64Binary">RFNNTHYyLjAgcm9ja3MhIQ==</controlValue>
+		</control>
+		<assertion name="sn"><value>Johnson</value></assertion>
+	</compareRequest>
+</batchRequest>
\ No newline at end of file

Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/test/resources/org/apache/directory/ldapstudio/dsmlv2/delRequest/request_with_1_control_base64_value.xml
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/test/resources/org/apache/directory/ldapstudio/dsmlv2/delRequest/request_with_1_control_base64_value.xml?view=auto&rev=483139
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/test/resources/org/apache/directory/ldapstudio/dsmlv2/delRequest/request_with_1_control_base64_value.xml (added)
+++ directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/test/resources/org/apache/directory/ldapstudio/dsmlv2/delRequest/request_with_1_control_base64_value.xml Wed Dec  6 08:33:02 2006
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<batchRequest xmlns="urn:oasis:names:tc:DSML:2.0:core"
+              xmlns:xsi="http://www.w3c.org/2001/XMLSchema-instance"
+              xmlns:xsd="http://www.w3c.org/2001/XMLSchema">
+	<delRequest dn="CN=Bob Rush,OU=Dev,DC=Example,DC=COM">
+		<control type="1.2.840.113556.1.4.643" criticality="true">
+			<controlValue xsi:type="xsd:base64Binary">RFNNTHYyLjAgcm9ja3MhIQ==</controlValue>
+		</control>
+	</delRequest>
+</batchRequest>
\ No newline at end of file

Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/test/resources/org/apache/directory/ldapstudio/dsmlv2/extendedRequest/request_with_1_control_base64_value.xml
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/test/resources/org/apache/directory/ldapstudio/dsmlv2/extendedRequest/request_with_1_control_base64_value.xml?view=auto&rev=483139
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/test/resources/org/apache/directory/ldapstudio/dsmlv2/extendedRequest/request_with_1_control_base64_value.xml (added)
+++ directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/test/resources/org/apache/directory/ldapstudio/dsmlv2/extendedRequest/request_with_1_control_base64_value.xml Wed Dec  6 08:33:02 2006
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<batchRequest xmlns="urn:oasis:names:tc:DSML:2.0:core"
+              xmlns:xsi="http://www.w3c.org/2001/XMLSchema-instance"
+              xmlns:xsd="http://www.w3c.org/2001/XMLSchema">
+	<extendedRequest>
+		<control type="1.2.840.113556.1.4.643" criticality="true">
+			<controlValue xsi:type="xsd:base64Binary">RFNNTHYyLjAgcm9ja3MhIQ==</controlValue>
+		</control>
+		<requestName>1.3.563.52.425</requestName>
+	</extendedRequest>
+</batchRequest>
\ No newline at end of file

Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/test/resources/org/apache/directory/ldapstudio/dsmlv2/modDNRequest/request_with_1_control_base64_value.xml
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/test/resources/org/apache/directory/ldapstudio/dsmlv2/modDNRequest/request_with_1_control_base64_value.xml?view=auto&rev=483139
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/test/resources/org/apache/directory/ldapstudio/dsmlv2/modDNRequest/request_with_1_control_base64_value.xml (added)
+++ directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/test/resources/org/apache/directory/ldapstudio/dsmlv2/modDNRequest/request_with_1_control_base64_value.xml Wed Dec  6 08:33:02 2006
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<batchRequest xmlns="urn:oasis:names:tc:DSML:2.0:core"
+              xmlns:xsi="http://www.w3c.org/2001/XMLSchema-instance"
+              xmlns:xsd="http://www.w3c.org/2001/XMLSchema">
+	<modDNRequest dn="CN=Bob Rush,OU=Dev,DC=Example,DC=COM"
+								newrdn="CN=Bob Rush,OU=Dev,DC=Example,DC=COM2">
+		<control type="1.2.840.113556.1.4.643" criticality="true">
+			<controlValue xsi:type="xsd:base64Binary">RFNNTHYyLjAgcm9ja3MhIQ==</controlValue>
+		</control>
+	</modDNRequest>
+</batchRequest>
\ No newline at end of file

Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/test/resources/org/apache/directory/ldapstudio/dsmlv2/modifyRequest/request_with_1_control_base64_value.xml
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/test/resources/org/apache/directory/ldapstudio/dsmlv2/modifyRequest/request_with_1_control_base64_value.xml?view=auto&rev=483139
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/test/resources/org/apache/directory/ldapstudio/dsmlv2/modifyRequest/request_with_1_control_base64_value.xml (added)
+++ directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/test/resources/org/apache/directory/ldapstudio/dsmlv2/modifyRequest/request_with_1_control_base64_value.xml Wed Dec  6 08:33:02 2006
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<batchRequest xmlns="urn:oasis:names:tc:DSML:2.0:core"
+              xmlns:xsi="http://www.w3c.org/2001/XMLSchema-instance"
+              xmlns:xsd="http://www.w3c.org/2001/XMLSchema">
+<modifyRequest dn="CN=Bob Rush,OU=Dev,DC=Example,DC=COM">
+		<control type="1.2.840.113556.1.4.643" criticality="true">
+			<controlValue xsi:type="xsd:base64Binary">RFNNTHYyLjAgcm9ja3MhIQ==</controlValue>
+		</control>
+	</modifyRequest>
+</batchRequest>
\ No newline at end of file

Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/test/resources/org/apache/directory/ldapstudio/dsmlv2/searchRequest/request_with_1_control_base64_value.xml
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/test/resources/org/apache/directory/ldapstudio/dsmlv2/searchRequest/request_with_1_control_base64_value.xml?view=auto&rev=483139
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/test/resources/org/apache/directory/ldapstudio/dsmlv2/searchRequest/request_with_1_control_base64_value.xml (added)
+++ directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/test/resources/org/apache/directory/ldapstudio/dsmlv2/searchRequest/request_with_1_control_base64_value.xml Wed Dec  6 08:33:02 2006
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<batchRequest xmlns="urn:oasis:names:tc:DSML:2.0:core"
+              xmlns:xsi="http://www.w3c.org/2001/XMLSchema-instance"
+              xmlns:xsd="http://www.w3c.org/2001/XMLSchema">
+<searchRequest dn="ou=marketing,dc=microsoft,dc=com"
+				scope="baseObject"
+				derefAliases="neverDerefAliases">
+		<control type="1.2.840.113556.1.4.643" criticality="true">
+			<controlValue xsi:type="xsd:base64Binary">RFNNTHYyLjAgcm9ja3MhIQ==</controlValue>
+		</control>
+		<filter>
+			<approxMatch name="sn">
+				<value>toto</value>
+			</approxMatch>
+		</filter>
+	</searchRequest>
+</batchRequest>
\ No newline at end of file



Mime
View raw message