Package com.arjuna.webservices.wscoor

Examples of com.arjuna.webservices.wscoor.CoordinationContextType


        final AddressingContext addressingContext = AddressingContext.createRequestContext(activationRequesterService, messageId) ;
        addressingContext.addRelatesTo(new RelationshipType(relatesTo)) ;
       
        final String coordinationType = TestUtil.COORDINATION_TYPE ;
        final String identifier = TestUtil.PROTOCOL_IDENTIFIER ;
        final CoordinationContextType coordinationContext = new CoordinationContextType() ;
        coordinationContext.setCoordinationType(new URI(coordinationType)) ;
        coordinationContext.setIdentifier(new AttributedURIType(identifier)) ;
        final EndpointReferenceType registrationService = new EndpointReferenceType(new AttributedURIType("http://www.example.com/registrationService")) ;
        coordinationContext.setRegistrationService(registrationService) ;
       
        final TestActivationRequesterCallback callback = new TestActivationRequesterCallback() {
            public void createCoordinationContextResponse(final CreateCoordinationContextResponseType createCoordinationContextResponse, final AddressingContext addressingContext)
            {
                assertEquals(addressingContext.getTo().getValue(), activationRequesterService.getAddress().getValue());
                assertEquals(addressingContext.getFrom().getAddress().getValue(), activationCoordinatorService.getAddress().getValue());
                assertNull(addressingContext.getReplyTo());
                assertEquals(addressingContext.getMessageID().getValue(), messageId);
               
                final CoordinationContextType coordinationContext = createCoordinationContextResponse.getCoordinationContext() ;
                assertNotNull(coordinationContext) ;
                assertEquals(coordinationType, coordinationContext.getCoordinationType().getValue()) ;
                assertEquals(identifier, coordinationContext.getIdentifier().getValue()) ;
                assertEquals(registrationService.getAddress().getValue(), coordinationContext.getRegistrationService().getAddress().getValue()) ;
            }
        };
        final ActivationRequesterProcessor requester = ActivationRequesterProcessor.getRequester() ;
        requester.registerCallback(relatesTo, callback) ;
        try
View Full Code Here


        throws Exception
    {
        final String messageId = "testRequestWithoutExpiresWithoutCurrentContext" ;
        final String coordinationType = TestUtil.COORDINATION_TYPE ;
        final Long expires = null ;
        final CoordinationContextType coordinationContext = null ;
       
        executeRequestTest(messageId, coordinationType, expires, coordinationContext) ;
    }
View Full Code Here

        throws Exception
    {
        final String messageId = "testRequestWithExpiresWithoutCurrentContext" ;
        final String coordinationType = TestUtil.COORDINATION_TYPE ;
        final Long expires = new Long(123456L) ;
        final CoordinationContextType coordinationContext = null ;
       
        executeRequestTest(messageId, coordinationType, expires, coordinationContext) ;
    }
View Full Code Here

        throws Exception
    {
        final String messageId = "testRequestWithoutExpiresWithCurrentContextWithoutExpires" ;
        final String coordinationType = TestUtil.COORDINATION_TYPE ;
        final Long expires = null ;
        final CoordinationContextType coordinationContext = new CoordinationContextType() ;
        coordinationContext.setCoordinationType(new URI(coordinationType)) ;
        coordinationContext.setRegistrationService(activationCoordinatorService) ;
        coordinationContext.setIdentifier(new AttributedURIType(TestUtil.PROTOCOL_IDENTIFIER)) ;
       
        executeRequestTest(messageId, coordinationType, expires, coordinationContext) ;
    }
View Full Code Here

        throws Exception
    {
        final String messageId = "testRequestWithoutExpiresWithCurrentContextWithExpires" ;
        final String coordinationType = TestUtil.COORDINATION_TYPE ;
        final Long expires = null ;
        final CoordinationContextType coordinationContext = new CoordinationContextType() ;
        coordinationContext.setCoordinationType(new URI(coordinationType)) ;
        coordinationContext.setRegistrationService(activationCoordinatorService) ;
        coordinationContext.setIdentifier(new AttributedURIType(TestUtil.PROTOCOL_IDENTIFIER)) ;
        coordinationContext.setExpires(new AttributedUnsignedIntType(123456L)) ;
       
        executeRequestTest(messageId, coordinationType, expires, coordinationContext) ;
    }
View Full Code Here

        throws Exception
    {
        final String messageId = "testRequestWithExpiresWithCurrentContextWithoutExpires" ;
        final String coordinationType = TestUtil.COORDINATION_TYPE ;
        final Long expires = new Long(123456L) ;
        final CoordinationContextType coordinationContext = new CoordinationContextType() ;
        coordinationContext.setCoordinationType(new URI(coordinationType)) ;
        coordinationContext.setRegistrationService(activationCoordinatorService) ;
        coordinationContext.setIdentifier(new AttributedURIType(TestUtil.PROTOCOL_IDENTIFIER)) ;
       
        executeRequestTest(messageId, coordinationType, expires, coordinationContext) ;
    }
View Full Code Here

        throws Exception
    {
        final String messageId = "testRequestWithExpiresWithCurrentContextWithExpires" ;
        final String coordinationType = TestUtil.COORDINATION_TYPE ;
        final Long expires = new Long(123456L) ;
        final CoordinationContextType coordinationContext = new CoordinationContextType() ;
        coordinationContext.setCoordinationType(new URI(coordinationType)) ;
        coordinationContext.setRegistrationService(activationCoordinatorService) ;
        coordinationContext.setIdentifier(new AttributedURIType(TestUtil.PROTOCOL_IDENTIFIER)) ;
        coordinationContext.setExpires(new AttributedUnsignedIntType(1234567L)) ;
       
        executeRequestTest(messageId, coordinationType, expires, coordinationContext) ;
    }
View Full Code Here

        final AddressingContext addressingContext = AddressingContext.createRequestContext(activationRequesterService, messageId) ;
        addressingContext.addRelatesTo(new RelationshipType(relatesTo)) ;
       
        final String coordinationType = TestUtil.COORDINATION_TYPE ;
        final String identifier = TestUtil.PROTOCOL_IDENTIFIER ;
        final CoordinationContextType coordinationContext = new CoordinationContextType() ;
        coordinationContext.setCoordinationType(new URI(coordinationType)) ;
        coordinationContext.setRegistrationService(activationCoordinatorService) ;
        coordinationContext.setIdentifier(new AttributedURIType(identifier)) ;
       
        final TestActivationRequesterCallback callback = new TestActivationRequesterCallback() {
            public void createCoordinationContextResponse(final CreateCoordinationContextResponseType createCoordinationContextResponse, final AddressingContext addressingContext)
            {
                assertEquals(addressingContext.getTo().getValue(), activationRequesterService.getAddress().getValue());
                assertEquals(addressingContext.getFrom().getAddress().getValue(), activationCoordinatorService.getAddress().getValue());
                assertNull(addressingContext.getReplyTo());
                assertEquals(addressingContext.getMessageID().getValue(), messageId);
               
                final CoordinationContextType coordinationContext = createCoordinationContextResponse.getCoordinationContext() ;
                assertNotNull(coordinationContext) ;
                assertEquals(coordinationType, coordinationContext.getCoordinationType().getValue()) ;
                assertEquals(identifier, coordinationContext.getIdentifier().getValue()) ;
            }
        };
        final ActivationRequesterProcessor requester = ActivationRequesterProcessor.getRequester() ;
        requester.registerCallback(relatesTo, callback) ;
        try
View Full Code Here

        final AddressingContext addressingContext = AddressingContext.createRequestContext(activationRequesterService, messageId) ;
        addressingContext.addRelatesTo(new RelationshipType(relatesTo)) ;
       
        final String coordinationType = TestUtil.COORDINATION_TYPE ;
        final String identifier = TestUtil.PROTOCOL_IDENTIFIER ;
        final CoordinationContextType coordinationContext = new CoordinationContextType() ;
        coordinationContext.setCoordinationType(new URI(coordinationType)) ;
        coordinationContext.setIdentifier(new AttributedURIType(identifier)) ;
        final EndpointReferenceType registrationService = new EndpointReferenceType(new AttributedURIType("http://www.example.com/registrationService")) ;
        coordinationContext.setRegistrationService(registrationService) ;
       
        final TestActivationRequesterCallback callback = new TestActivationRequesterCallback() {
            public void createCoordinationContextResponse(final CreateCoordinationContextResponseType createCoordinationContextResponse, final AddressingContext addressingContext)
            {
                assertEquals(addressingContext.getTo().getValue(), activationRequesterService.getAddress().getValue());
                assertEquals(addressingContext.getFrom().getAddress().getValue(), activationCoordinatorService.getAddress().getValue());
                assertNull(addressingContext.getReplyTo());
                assertEquals(addressingContext.getMessageID().getValue(), messageId);
               
                final CoordinationContextType coordinationContext = createCoordinationContextResponse.getCoordinationContext() ;
                assertNotNull(coordinationContext) ;
                assertEquals(coordinationType, coordinationContext.getCoordinationType().getValue()) ;
                assertEquals(identifier, coordinationContext.getIdentifier().getValue()) ;
                assertEquals(registrationService.getAddress().getValue(), coordinationContext.getRegistrationService().getAddress().getValue()) ;
            }
        };
        final ActivationRequesterProcessor requester = ActivationRequesterProcessor.getRequester() ;
        requester.registerCallback(relatesTo, callback) ;
        try
View Full Code Here

    public void testAlreadyRegisteredProtocolIdentifierException()
        throws Exception
    {
        final String messageId = "testAlreadyRegisteredProtocolIdentifierException" ;
        final String protocolIdentifier = TestUtil.ALREADY_REGISTERED_PROTOCOL_IDENTIFIER ;
        final CoordinationContextType coordinationContext = new CoordinationContextType() ;
        coordinationContext.setCoordinationType(new URI(TestUtil.COORDINATION_TYPE)) ;
        coordinationContext.setIdentifier(new AttributedURIType("identifier")) ;
        coordinationContext.setRegistrationService(registrationCoordinator) ;
        try
        {
            RegistrationCoordinator.register(coordinationContext, messageId, registrationRequester, protocolIdentifier) ;
        }
        catch (final AlreadyRegisteredException are) {}
View Full Code Here

TOP

Related Classes of com.arjuna.webservices.wscoor.CoordinationContextType

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.