Examples of NotifyDocument


Examples of org.oasisOpen.docs.wsn.x2004.x06.wsnWSBaseNotification12Draft01.NotifyDocument

        }
    }

    private XmlObject wrapMessageWithNotify( XmlObject msg )
    {
        NotifyDocument notifyDoc = NotifyDocument.Factory.newInstance();
        NotifyDocument.Notify notify = notifyDoc.addNewNotify();
        NotificationMessageHolderType notifMsgHolder = notify.addNewNotificationMessage();
        notifMsgHolder.setMessage( msg );
        notifMsgHolder.setProducerReference( (EndpointReferenceType) ( (XmlObjectWrapper) m_subscription.getProducerResource().getEndpointReference() ).getXmlObject() );
        TopicExpressionType topicExpr = (TopicExpressionType) ( (XmlObjectWrapper) m_subscription.getTopicExpression() ).getXmlObject();
        notifMsgHolder.setTopic( topicExpr );
View Full Code Here

Examples of org.oasisOpen.docs.wsn.x2004.x06.wsnWSBaseNotification12Draft01.NotifyDocument

    {*/
        SubscriptionTopicListener lis = new SubscriptionTopicListener(sub);
        AnyResourcePropertyMetaData anyMeta = new AnyResourcePropertyMetaData(new QName("foo"));

        //need some sort of documenttype
        NotifyDocument doc = NotifyDocument.Factory.newInstance();
        XmlBeansResourcePropertySet set = new XmlBeansResourcePropertySet(doc);
        XmlBeansResourceProperty prop = new XmlBeansResourceProperty(anyMeta,set);
        ResourcePropertyValueChangeTopicImpl topic = new ResourcePropertyValueChangeTopicImpl(prop);
        TopicListenerTestObj testListenr = new TopicListenerTestObj();
        topic.addTopicListener(testListenr);
View Full Code Here

Examples of org.oasisOpen.docs.wsn.x2004.x06.wsnWSBaseNotification12Draft01.NotifyDocument

   private XmlObject wrapMessageWithNotify( XmlObject       msgXBean,
                                            TopicExpression topicExpr )
   {
      // TODO (ips, 09/28/05): creation of Notify xbean should be spec-version-sensitive
      NotifyDocument                notifyDoc      = NotifyDocument.Factory.newInstance(  );
      NotifyDocument.Notify         notify         = notifyDoc.addNewNotify(  );
      NotificationMessageHolderType notifMsgHolder = notify.addNewNotificationMessage(  );
      notifMsgHolder.setMessage( msgXBean );
      EndpointReference         producerEPR       = m_producerResource.getEndpointReference(  );
      XmlBeansEndpointReference xBeansProducerEPR = ( (XmlBeansEndpointReference) producerEPR );
      notifMsgHolder.setProducerReference( (EndpointReferenceType) xBeansProducerEPR.getXmlObject( org.apache.ws.addressing.v2003_03.AddressingConstants.NSURI_ADDRESSING_SCHEMA ) );
View Full Code Here

Examples of org.servicemix.ws.xmlbeans.notification.base.NotifyDocument

        ActiveMQConnection connection = broker.getConnection();
        Session session = connection.createSession(false, 0);
        ActiveMQTopic topic = new ActiveMQTopic("Test");
        MessageConsumer consumer = session.createConsumer(topic);
       
        NotifyDocument request = NotifyDocument.Factory.newInstance();
        Notify notify = request.addNewNotify();
        NotificationMessageHolderType messageHolder = notify.addNewNotificationMessage();
        messageHolder.setTopic( TopicExpressionConverter.toTopicExpression(topic) );
        XmlObject o = createMessage();
        messageHolder.setMessage(o);
       
View Full Code Here

Examples of org.servicemix.ws.xmlbeans.notification.base.NotifyDocument

        };

        addSubscription(broker);
        sendNotification(broker);

        NotifyDocument subNotifyDoc = (NotifyDocument) result.poll(2000);
        System.out.println("Got Notify: "+subNotifyDoc);

        assertValidMessage(subNotifyDoc);
    }
View Full Code Here

Examples of org.servicemix.ws.xmlbeans.notification.base.NotifyDocument

        EndpointReferenceType subRef = addSubscription(broker);
       
        // The sub should be running and we should be getting notifed now.
        sendNotification(broker);
        NotifyDocument subNotifyDoc = (NotifyDocument) result.poll(2000);
        assertNotNull(subNotifyDoc);
       
        // Pause the subscription.
        PauseSubscriptionDocument pauseRequest = PauseSubscriptionDocument.Factory.newInstance();
        pauseRequest.addNewPauseSubscription();
View Full Code Here

Examples of org.servicemix.ws.xmlbeans.notification.base.NotifyDocument

        return subresponse.getSubscribeResponse().getSubscriptionReference();
    }
   
    protected void sendNotification(ActiveMQNotificationBroker broker) {
        // START SNIPPET: notify
        NotifyDocument request = NotifyDocument.Factory.newInstance();
        NotifyDocument.Notify notify = request.addNewNotify();
        NotificationMessageHolderType messageHolder = notify.addNewNotificationMessage();
        messageHolder.setTopic( TopicExpressionConverter.toTopicExpression(topic) );

        // create some XMLBean for the payload
        XmlObject o = createMessage();
View Full Code Here

Examples of org.servicemix.ws.xmlbeans.notification.base.NotifyDocument

        };

        addSubscription(broker);
        sendNotification(broker);

        NotifyDocument subNotifyDoc = (NotifyDocument) service.getResult().poll(2000);
        System.out.println("Got Notify: "+subNotifyDoc);
       
        assertValidMessage(subNotifyDoc);
    }
View Full Code Here

Examples of org.servicemix.ws.xmlbeans.notification.base.NotifyDocument

            dispatch(topic, xml);
        }
    }

    private void dispatch(TopicExpressionType topic, XmlObject xml) {
        NotifyDocument request = NotifyDocument.Factory.newInstance();
        Notify notify = request.addNewNotify();
        NotificationMessageHolderType messageHolder = notify.addNewNotificationMessage();

        EndpointReferenceType producerReference = getProducerReference();
        if (producerReference != null) {
            messageHolder.setProducerReference((EndpointReferenceType) producerReference.copy());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.