Package org.w3._2003._05.soap_envelope

Examples of org.w3._2003._05.soap_envelope.Body


        }
    }

    protected void dispatch(TopicExpressionType topic, Object body) throws RemoteException {
        NotificationMessageHolderType messageHolder = new NotificationMessageHolderType();
        EndpointReferenceType producerReference = getProducerReference();
        if (producerReference != null) {
            messageHolder.setProducerReference(producerReference);
        }
        messageHolder.setTopic(topic);
        messageHolder.setMessage(body);
View Full Code Here


    /**
     * Extracts the subscriber endpoint from the subscription request using the
     * serviceName or the portType
     */
    protected ServiceEndpoint findSubscriberEndpoint(ActiveMQSubscription subscribe) {
        EndpointReferenceType consumerReference = subscribe.getConsumerReference();
        if (consumerReference == null) {
            throw new NotificationException("No consumerReference specified for subscription: " + subscribe);
        }
        ServiceNameType serviceNameType = consumerReference.getServiceName();
        if (serviceNameType == null) {
            log.warn("No service name available for subscription: " + subscribe);
        }
        else {
            QName serviceName = serviceNameType.getValue();
            ServiceEndpoint[] endpoints = context.getEndpointsForService(serviceName);
            if (endpoints != null && endpoints.length > 0) {
                // lets just return the first
                return endpoints[0];
            }
        }
        AttributedQName portTypeType = consumerReference.getPortType();
        if (portTypeType != null) {
            QName portType = portTypeType.getValue();
            ServiceEndpoint[] endpoints = context.getEndpoints(portType);
            if (endpoints != null && endpoints.length > 0) {
                // lets just return the first
View Full Code Here

            List<NotificationMessageHolderType> list) {

        try {
            for (NotificationMessageHolderType messageHolder : list) {
                Topic topic = topicConverter.toActiveMQTopic(messageHolder.getTopic());
                EndpointReferenceType producerReference = messageHolder.getProducerReference();
                ActiveMQPublisherRegistration publisher = getPublisher(producerReference);
                publisher.notify(topic, messageHolder.getMessage());
            }
        }
        catch (TransformerException e) {
View Full Code Here

        ActiveMQTopic topic = topicConverter.toActiveMQTopic(list);

        terminationTime = validateTerminationTime(terminationTime);

        // Create publisher and assoicate an EndpointReference with it.
        EndpointReferenceType registrationEndpointReference = null;
        try {

            ActiveMQPublisherRegistration publisher = new ActiveMQPublisherRegistration(connection);
            registrationEndpointReference = publisherManager.register(publisher);
            publisher.setEndpointReference(registrationEndpointReference);
View Full Code Here

public class ActiveMQSubscriptionManager implements SubscriptionManager {

    private final ConcurrentHashMap subscriptions = new ConcurrentHashMap();

    public EndpointReferenceType register(ActiveMQSubscription subscription) {
        EndpointReferenceType reference = subscription.getConsumerReference();
        subscriptions.put(reference, subscription);
        return reference;
    }
View Full Code Here

    public void testSubscriptionPauseResume() throws Exception {

        Slot result = new Slot();
        ActiveMQNotificationBroker broker = createBroker(result);

        EndpointReferenceType subRef = addSubscription(broker);

        // The sub should be running and we should be getting notifed now.
        sendNotification(broker);

        List<NotificationMessageHolderType> subNotifyDoc = (List<NotificationMessageHolderType>) result.poll(2000);
View Full Code Here

    protected EndpointReferenceType addSubscription(ActiveMQNotificationBroker broker) throws Exception {
        // START SNIPPET: subscribe
        String topicName = TOPIC_NAME;
        TopicExpressionType topicExpression = new TopicExpressionType();
        topicExpression.getContent().add(topicName);
        EndpointReferenceType consumerReference = createReference();
        Boolean useNotify = Boolean.TRUE;
        QueryExpressionType precondition = null;
        QueryExpressionType selector = null;
        Object subscriptionPolicy = null;
        XMLGregorianCalendar terminationTime = null;
        EndpointReferenceType reference = broker.subscribe(consumerReference, topicExpression, useNotify, precondition,
                selector, subscriptionPolicy, terminationTime);
        // END SNIPPET: subscribe
        return reference;
    }
View Full Code Here

            assertNotNull("null: message[" + i + "]", message);
        }
    }

    protected EndpointReferenceType createReference() {
        return new EndpointReferenceType();
    }
View Full Code Here

            @WebParam(name = "SubscriptionPolicy", targetNamespace = "http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd")
            Object subscriptionPolicy,
            @WebParam(name = "InitialTerminationTime", targetNamespace = "http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd")
            XMLGregorianCalendar terminationTime) throws ResourceUnknownFault, SubscribeCreationFailedFault {
      EndpointReferenceType ref = new EndpointReferenceType();
      ServiceNameType sn = new ServiceNameType();
      sn.setPortName("myPort");
      ref.setServiceName(sn);
      return ref;
    }
View Full Code Here

    protected ServiceEndpoint findSubscriberEndpoint(ActiveMQSubscription subscribe) {
        EndpointReferenceType consumerReference = subscribe.getConsumerReference();
        if (consumerReference == null) {
            throw new NotificationException("No consumerReference specified for subscription: " + subscribe);
        }
        ServiceNameType serviceNameType = consumerReference.getServiceName();
        if (serviceNameType == null) {
            log.warn("No service name available for subscription: " + subscribe);
        }
        else {
            QName serviceName = serviceNameType.getValue();
            ServiceEndpoint[] endpoints = context.getEndpointsForService(serviceName);
            if (endpoints != null && endpoints.length > 0) {
                // lets just return the first
                return endpoints[0];
            }
View Full Code Here

TOP

Related Classes of org.w3._2003._05.soap_envelope.Body

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.