You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by "Raphaël Ouazana (JIRA)" <ji...@apache.org> on 2012/05/07 11:39:52 UTC

[jira] [Created] (DIRAPI-86) SyncRequestValue control is not correctly sent

Raphaël Ouazana created DIRAPI-86:
-------------------------------------

             Summary: SyncRequestValue control is not correctly sent
                 Key: DIRAPI-86
                 URL: https://issues.apache.org/jira/browse/DIRAPI-86
             Project: Directory Client API
          Issue Type: Bug
    Affects Versions: 1.0.0-M11
            Reporter: Raphaël Ouazana


I'm trying to send a SyncRepl RefreshAndPersist control:
SyncRequestValueImpl syncControl = new SyncRequestValueImpl();
syncControl.setMode(org.apache.directory.shared.ldap.extras.controls.SynchronizationModeEnum.REFRESH_AND_PERSIST);

OpenLDAP returns the following:
conn=1038 op=0 RESULT tag=97 err=0 text=
conn=1038 op=1 SEARCH RESULT tag=101 err=2 nentries=0 text=Sync control value is absent

When I look at the network traces, I can see that only the OID is sent :
controlType: 1.3.6.1.4.1.4203.1.9.1.1 (syncRequestOID)

Note that the same piece of code works fine with (old) 0.9.19 version. The control is then correctly sent:
controlType: 1.3.6.1.4.1.4203.1.9.1.1 (syncRequestOID)
SyncRequestValue
mode: refreshAndPersist (3)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Resolved] (DIRAPI-86) SyncRequestValue control is not correctly sent

Posted by "Emmanuel Lecharny (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DIRAPI-86?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Emmanuel Lecharny resolved DIRAPI-86.
-------------------------------------

    Resolution: Not A Problem

The API has changed since 1.0-M9
                
> SyncRequestValue control is not correctly sent
> ----------------------------------------------
>
>                 Key: DIRAPI-86
>                 URL: https://issues.apache.org/jira/browse/DIRAPI-86
>             Project: Directory Client API
>          Issue Type: Bug
>    Affects Versions: 1.0.0-M11
>            Reporter: Raphaël Ouazana
>
> I'm trying to send a SyncRepl RefreshAndPersist control:
> SyncRequestValueImpl syncControl = new SyncRequestValueImpl();
> syncControl.setMode(org.apache.directory.shared.ldap.extras.controls.SynchronizationModeEnum.REFRESH_AND_PERSIST);
> OpenLDAP returns the following:
> conn=1038 op=0 RESULT tag=97 err=0 text=
> conn=1038 op=1 SEARCH RESULT tag=101 err=2 nentries=0 text=Sync control value is absent
> When I look at the network traces, I can see that only the OID is sent :
> controlType: 1.3.6.1.4.1.4203.1.9.1.1 (syncRequestOID)
> Note that the same piece of code works fine with (old) 0.9.19 version. The control is then correctly sent:
> controlType: 1.3.6.1.4.1.4203.1.9.1.1 (syncRequestOID)
> SyncRequestValue
> mode: refreshAndPersist (3)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (DIRAPI-86) SyncRequestValue control is not correctly sent

Posted by "Emmanuel Lecharny (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRAPI-86?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13272363#comment-13272363 ] 

Emmanuel Lecharny commented on DIRAPI-86:
-----------------------------------------

You should use the SyncRequestValueImpl class if you want it you be encoded correctly, we have changed the way it's get encoded.

see :
        DefaultLdapCodecService codec = new DefaultLdapCodecService();
        SyncRequestValue syncRequestValue = new SyncRequestValueImpl();
        syncRequestValue.setMode( SynchronizationModeEnum.REFRESH_ONLY );
        
        SyncRequestValueDecorator decorator = new SyncRequestValueDecorator( codec, syncRequestValue );
        
        ByteBuffer buffer = decorator.encode( ByteBuffer.allocate( decorator.computeLength() ) );
...

Now, the buffer contains the correct bytes.

So basically, you must use a decorator to encapsulate the control, in order to encode it.
        
Doe sit helps ?
                
> SyncRequestValue control is not correctly sent
> ----------------------------------------------
>
>                 Key: DIRAPI-86
>                 URL: https://issues.apache.org/jira/browse/DIRAPI-86
>             Project: Directory Client API
>          Issue Type: Bug
>    Affects Versions: 1.0.0-M11
>            Reporter: Raphaël Ouazana
>
> I'm trying to send a SyncRepl RefreshAndPersist control:
> SyncRequestValueImpl syncControl = new SyncRequestValueImpl();
> syncControl.setMode(org.apache.directory.shared.ldap.extras.controls.SynchronizationModeEnum.REFRESH_AND_PERSIST);
> OpenLDAP returns the following:
> conn=1038 op=0 RESULT tag=97 err=0 text=
> conn=1038 op=1 SEARCH RESULT tag=101 err=2 nentries=0 text=Sync control value is absent
> When I look at the network traces, I can see that only the OID is sent :
> controlType: 1.3.6.1.4.1.4203.1.9.1.1 (syncRequestOID)
> Note that the same piece of code works fine with (old) 0.9.19 version. The control is then correctly sent:
> controlType: 1.3.6.1.4.1.4203.1.9.1.1 (syncRequestOID)
> SyncRequestValue
> mode: refreshAndPersist (3)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (DIRAPI-86) SyncRequestValue control is not correctly sent

Posted by "Raphaël Ouazana (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRAPI-86?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13272393#comment-13272393 ] 

Raphaël Ouazana commented on DIRAPI-86:
---------------------------------------

Thank you, it works fine using a decorator. You can close this issue.

Regards,
Raphaël Ouazana.
                
> SyncRequestValue control is not correctly sent
> ----------------------------------------------
>
>                 Key: DIRAPI-86
>                 URL: https://issues.apache.org/jira/browse/DIRAPI-86
>             Project: Directory Client API
>          Issue Type: Bug
>    Affects Versions: 1.0.0-M11
>            Reporter: Raphaël Ouazana
>
> I'm trying to send a SyncRepl RefreshAndPersist control:
> SyncRequestValueImpl syncControl = new SyncRequestValueImpl();
> syncControl.setMode(org.apache.directory.shared.ldap.extras.controls.SynchronizationModeEnum.REFRESH_AND_PERSIST);
> OpenLDAP returns the following:
> conn=1038 op=0 RESULT tag=97 err=0 text=
> conn=1038 op=1 SEARCH RESULT tag=101 err=2 nentries=0 text=Sync control value is absent
> When I look at the network traces, I can see that only the OID is sent :
> controlType: 1.3.6.1.4.1.4203.1.9.1.1 (syncRequestOID)
> Note that the same piece of code works fine with (old) 0.9.19 version. The control is then correctly sent:
> controlType: 1.3.6.1.4.1.4203.1.9.1.1 (syncRequestOID)
> SyncRequestValue
> mode: refreshAndPersist (3)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira