Package org.apache.directory.studio.dsmlv2.reponse

Examples of org.apache.directory.studio.dsmlv2.reponse.SearchResultDoneDsml


                if ( srDone != null )
                {
                    resultCode = srDone.getLdapResult().getResultCode();
                   
                    SearchResultDoneDsml srdDsml = new SearchResultDoneDsml( connection.getCodecService(), srDone );
                   
                    if ( respWriter != null )
                    {
                        writeResponse( respWriter, srdDsml);
                        respWriter.write( "</searchResponse>" );
View Full Code Here


                if ( srDone != null )
                {
                    resultCode = srDone.getLdapResult().getResultCode();
                   
                    SearchResultDoneDsml srdDsml = new SearchResultDoneDsml( connection.getCodecService(), srDone );
                   
                    if ( respWriter != null )
                    {
                        writeResponse( respWriter, srdDsml);
                        respWriter.write( "</searchResponse>" );
View Full Code Here

                if ( srDone != null )
                {
                    resultCode = srDone.getLdapResult().getResultCode();
                   
                    SearchResultDoneDsml srdDsml = new SearchResultDoneDsml( connection.getCodecService(), srDone );
                    writeResponse( respWriter, srdDsml);
                   
                    if ( respWriter != null )
                    {
                        respWriter.write( "</searchResponse>" );
View Full Code Here

                if ( srDone != null )
                {
                    resultCode = srDone.getLdapResult().getResultCode();

                    SearchResultDoneDsml srdDsml = new SearchResultDoneDsml( connection.getCodecService(), srDone );

                    if ( respWriter != null )
                    {
                        writeResponse( respWriter, srdDsml );
                        respWriter.write( "</searchResponse>" );
View Full Code Here

                if ( srDone != null )
                {
                    resultCode = srDone.getLdapResult().getResultCode();

                    SearchResultDoneDsml srdDsml = new SearchResultDoneDsml( connection.getCodecService(), srDone );

                    if ( respWriter != null )
                    {
                        writeResponse( respWriter, srdDsml );
                        respWriter.write( "</searchResponse>" );
View Full Code Here

    /**
     * Test parsing of a request with the dn attribute
     */
    public void testRequestWithDn()
    {
        Dsmlv2Parser parser = null;
        try
        {
            parser = new Dsmlv2Parser();

            parser.setInputFile( SearchRequestTest.class.getResource( "request_with_dn_attribute.xml" ).getFile() );

            parser.parse();
        }
        catch ( Exception e )
        {
            fail( e.getMessage() );
        }

        SearchRequest searchRequest = ( SearchRequest ) parser.getBatchRequest().getCurrentRequest();

        assertEquals( "ou=marketing,dc=microsoft,dc=com", searchRequest.getBaseObject().toString() );
    }
View Full Code Here

    /**
     * Test parsing of a request with the (optional) requestID attribute
     */
    public void testRequestWithRequestId()
    {
        Dsmlv2Parser parser = null;
        try
        {
            parser = new Dsmlv2Parser();

            parser.setInputFile( SearchRequestTest.class.getResource( "request_with_requestID_attribute.xml" )
                .getFile() );

            parser.parse();
        }
        catch ( Exception e )
        {
            fail( e.getMessage() );
        }

        SearchRequest searchRequest = ( SearchRequest ) parser.getBatchRequest().getCurrentRequest();

        assertEquals( 456, searchRequest.getMessageId() );
    }
View Full Code Here

    /**
     * Test parsing of a request with a (optional) Control element
     */
    public void testRequestWith1Control()
    {
        Dsmlv2Parser parser = null;
        try
        {
            parser = new Dsmlv2Parser();

            parser.setInputFile( SearchRequestTest.class.getResource( "request_with_1_control.xml" ).getFile() );

            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() );
View Full Code Here

     */
    public void testParsingFail( Class testClass, String filename )
    {
        try
        {
            Dsmlv2Parser parser = new Dsmlv2Parser();

            parser.setInputFile( testClass.getResource( filename ).getFile() );

            parser.parse();
        }
        catch ( XmlPullParserException e )
        {
            assertTrue( e.getMessage(), true );
            return;
View Full Code Here

    /**
     * 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( SearchRequestTest.class.getResource( "request_with_1_control_base64_value.xml" )
                .getFile() );

            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() );
View Full Code Here

TOP

Related Classes of org.apache.directory.studio.dsmlv2.reponse.SearchResultDoneDsml

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.