Package com.arjuna.webservices.wsaddr

Examples of com.arjuna.webservices.wsaddr.EndpointReferenceType


        // Add client policies
        ClientPolicy.register(handlerRegistry) ;
       
        soapService = new SoapService(handlerRegistry) ;
        final String registrationRequesterURI = SoapRegistry.getRegistry().getServiceURI(CoordinationConstants.SERVICE_REGISTRATION_REQUESTER) ;
        registrationRequester = new EndpointReferenceType(new AttributedURIType(registrationRequesterURI)) ;
    }
View Full Code Here


        else if (protocolIdentifier.equals(TestUtil.INVALID_STATE_PROTOCOL_IDENTIFIER))
            throw new InvalidStateException();
        else if (protocolIdentifier.equals(TestUtil.NO_ACTIVITY_PROTOCOL_IDENTIFIER))
            throw new NoActivityException();

        return new EndpointReferenceType(new AttributedURIType(TestUtil.PROTOCOL_COORDINATOR_SERVICE)) ;
    }
View Full Code Here

        CoordinationContextType testCoordinationContext = new CoordinationContextType();

        final SoapRegistry soapRegistry = SoapRegistry.getRegistry() ;
        final String registrationURI = soapRegistry.getServiceURI(CoordinationConstants.SERVICE_REGISTRATION_COORDINATOR) ;
        final EndpointReferenceType registrationService = new EndpointReferenceType(new AttributedURIType(registrationURI)) ;
       
        testCoordinationContext.setIdentifier(new AttributedURIType(Integer.toString(nextIdentifier()))) ;
        testCoordinationContext.setCoordinationType(new URI(_coordinationType)) ;
        testCoordinationContext.setRegistrationService(registrationService) ;
       
View Full Code Here

        throws Exception
    {
        origActivationCoordinatorProcessor = ActivationCoordinatorProcessor.setCoordinator(testActivationCoordinatorProcessor) ;
        final SoapRegistry soapRegistry = SoapRegistry.getRegistry() ;
        final String activationCoordinatorServiceURI = soapRegistry.getServiceURI(CoordinationConstants.SERVICE_ACTIVATION_COORDINATOR) ;
        activationCoordinatorService = new EndpointReferenceType(new AttributedURIType(activationCoordinatorServiceURI)) ;
        final String activationRequesterServiceURI = soapRegistry.getServiceURI(CoordinationConstants.SERVICE_ACTIVATION_REQUESTER) ;
        activationRequesterService = new EndpointReferenceType(new AttributedURIType(activationRequesterServiceURI)) ;
       
        origRegistrationCoordinatorProcessor = RegistrationCoordinatorProcessor.setCoordinator(testRegistrationCoordinatorProcessor) ;
        final String registrationCoordinatorServiceURI = soapRegistry.getServiceURI(CoordinationConstants.SERVICE_REGISTRATION_COORDINATOR) ;
        registrationCoordinatorService = new EndpointReferenceType(new AttributedURIType(registrationCoordinatorServiceURI)) ;
        final String registrationRequesterServiceURI = soapRegistry.getServiceURI(CoordinationConstants.SERVICE_REGISTRATION_REQUESTER) ;
        registrationRequesterService = new EndpointReferenceType(new AttributedURIType(registrationRequesterServiceURI)) ;
    }
View Full Code Here

        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 doRegisterRequest(final String messageId)
        throws Exception
    {
        final String protocolIdentifier = TestUtil.PROTOCOL_IDENTIFIER ;
        final EndpointReferenceType participantProtocolService = new EndpointReferenceType(new AttributedURIType(TestUtil.PROTOCOL_PARTICIPANT_SERVICE)) ;
        final AddressingContext addressingContext = AddressingContext.createRequestContext(registrationCoordinatorService, messageId) ;
        RegistrationCoordinatorClient.getClient().sendRegister(addressingContext, protocolIdentifier, participantProtocolService) ;
       
        final RegisterDetails details = testRegistrationCoordinatorProcessor.getRegisterDetails(messageId, 10000) ;
        final RegisterType requestRegister = details.getRegister() ;
        final AddressingContext requestAddressingContext = details.getAddressingContext() ;
        final ArjunaContext requestArjunaContext = details.getArjunaContext() ;

        assertEquals(requestAddressingContext.getTo().getValue(), registrationCoordinatorService.getAddress().getValue());
        assertEquals(requestAddressingContext.getFrom().getAddress().getValue(), registrationRequesterService.getAddress().getValue());
        assertEquals(requestAddressingContext.getReplyTo().getAddress().getValue(), registrationRequesterService.getAddress().getValue());
        assertEquals(requestAddressingContext.getMessageID().getValue(), messageId);
       
        assertNull(requestArjunaContext.getInstanceIdentifier()) ;

        assertEquals(protocolIdentifier, requestRegister.getProtocolIdentifier().getValue()) ;
        assertEquals(participantProtocolService.getAddress().getValue(),
            requestRegister.getParticipantProtocolService().getAddress().getValue()) ;
    }
View Full Code Here

    {
        final String relatesTo = "doRegisterResponse" ;
        final AddressingContext addressingContext = AddressingContext.createRequestContext(registrationRequesterService, messageId) ;
        addressingContext.addRelatesTo(new RelationshipType(relatesTo)) ;
       
        final EndpointReferenceType coordinationProtocolService = new EndpointReferenceType(new AttributedURIType(TestUtil.PROTOCOL_COORDINATOR_SERVICE)) ;
       
        final TestRegistrationRequesterCallback callback = new TestRegistrationRequesterCallback() {
            public void registerResponse(final RegisterResponseType registerResponse, final AddressingContext addressingContext)
            {
                assertEquals(addressingContext.getTo().getValue(), registrationRequesterService.getAddress().getValue());
                assertEquals(addressingContext.getFrom().getAddress().getValue(), registrationCoordinatorService.getAddress().getValue());
                assertNull(addressingContext.getReplyTo());
                assertEquals(addressingContext.getMessageID().getValue(), messageId);
               
                assertEquals(coordinationProtocolService.getAddress().getValue(),
                    registerResponse.getCoordinatorProtocolService().getAddress().getValue()) ;
            }
        } ;
       
        final RegistrationRequesterProcessor requester = RegistrationRequesterProcessor.getRequester() ;
View Full Code Here

        String xmlEndpoint = ios.unpackString();
        StringReader stringReader = new StringReader(xmlEndpoint);
        XMLInputFactory factory = XMLInputFactory.newInstance();
        XMLStreamReader reader = factory.createXMLStreamReader(stringReader);
        StreamHelper.checkNextStartTag(reader, QNAME_TWO_PC_COORDINATOR) ;
        endpoint = new EndpointReferenceType(reader);
    }
View Full Code Here

        final String messageID, final EndpointReferenceType participantProtocolService,
        final String protocolIdentifier)
        throws AlreadyRegisteredException, InvalidProtocolException,
            InvalidStateException, NoActivityException, SoapFault
    {
        final EndpointReferenceType endpointReference = coordinationContext.getRegistrationService() ;
        final AddressingContext addressingContext = AddressingContext.createRequestContext(endpointReference, messageID) ;
       
        final RequestCallback callback = new RequestCallback() ;
        final RegistrationRequesterProcessor registrationRequester = RegistrationRequesterProcessor.getRequester() ;
        registrationRequester.registerCallback(messageID, callback) ;
View Full Code Here

        if (CoordinationConstants.WSCOOR_NAMESPACE.equals(elementName.getNamespaceURI()))
        {
            final String localPart = elementName.getLocalPart() ;
            if (CoordinationConstants.WSCOOR_ELEMENT_COORDINATOR_PROTOCOL_SERVICE.equals(localPart))
            {
                setCoordinatorProtocolService(new EndpointReferenceType(in)) ;
            }
            else
            {
                final String pattern = WSCLogger.log_mesg.getString("com.arjuna.webservices.wscoor.RegisterResponseType_2") ;
                final String message = MessageFormat.format(pattern, new Object[] {elementName}) ;
View Full Code Here

TOP

Related Classes of com.arjuna.webservices.wsaddr.EndpointReferenceType

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.