Examples of TopicExpressionType


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

        assertTrue( foundIt );
    }

    private Topic[] evaluate( String expr ) throws Exception
    {
        TopicExpressionType topicExpr = ( (TopicExpressionDocument) XmlObject.Factory.parse(
                "<wsnt:TopicExpression xmlns:wsnt='http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd' " +
                "xmlns:" +
                NSPREFIX1 +
                "='" +
                NSURI1 +
View Full Code Here

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

        assertTrue( foundIt );
    }

    private Topic[] evaluate( String expr ) throws Exception
    {
        TopicExpressionType topicExpr = ( (TopicExpressionDocument) XmlObject.Factory.parse(
                "<wsnt:TopicExpression xmlns:wsnt='http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd' " +
                "xmlns:" +
                NSPREFIX1 +
                "='" +
                NSURI1 +
View Full Code Here

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

        instance.setTimeInMillis(instance.getTimeInMillis() + 20000);
        subscribe.setInitialTerminationTime( instance );
        org.xmlsoap.schemas.ws.x2003.x03.addressing.EndpointReferenceType consumerRef = subscribe.addNewConsumerReference();
        org.xmlsoap.schemas.ws.x2003.x03.addressing.AttributedURI address = consumerRef.addNewAddress();
        address.setStringValue( consumerURL );
        TopicExpressionType topicExpr = subscribe.addNewTopicExpression();
        topicExpr.setDialect( TopicsConstants.TOPIC_EXPR_DIALECT_SIMPLE );
        XmlBeanUtils.setValueAsQName( topicExpr, topic );
        XmlObject response = sendRequest( requestDoc, "http://xyz.com/action/Subscribe" );
        if ( ! ( response instanceof SubscribeResponseDocument.SubscribeResponse ) )
        {
            throw new FaultException( response.toString() );
View Full Code Here

Examples of org.oasis_open.docs.wsn._2004._06.wsn_ws_basenotification_1_2_draft_01.TopicExpressionType

    private TopicExpressionConverter topicConverter = new TopicExpressionConverter();
    private EndpointReferenceType producerReference;

    public void onMessage(Message msg) {
        try {
            TopicExpressionType topic = extractTopic(msg);
            dispatchMessage(topic, msg);
        }
        catch (Throwable e) {
            log.error("Caught exception trying to dispatch message: " + e, e);
        }
View Full Code Here

Examples of org.oasis_open.docs.wsn._2004._06.wsn_ws_basenotification_1_2_draft_01.TopicExpressionType

    public TopicExpressionType toTopicExpression(ActiveMQTopic topic) {
        return toTopicExpression(topic.getPhysicalName());
    }

    public TopicExpressionType toTopicExpression(String name) {
        TopicExpressionType answer = new TopicExpressionType();
        answer.getContent().add(name);
        answer.setDialect(SIMPLE_DIALECT);
        return answer;
    }
View Full Code Here

Examples of org.oasis_open.docs.wsn._2004._06.wsn_ws_basenotification_1_2_draft_01.TopicExpressionType

    protected TopicExpressionConverter topicConverter = new TopicExpressionConverter();

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

Examples of org.oasis_open.docs.wsn._2004._06.wsn_ws_basenotification_1_2_draft_01.TopicExpressionType

    }

    protected void sendNotification(ActiveMQNotificationBroker broker) {
        // START SNIPPET: notify
        String topicName = TOPIC_NAME;
        TopicExpressionType topicExpression = new TopicExpressionType();
        topicExpression.getContent().add(topicName);

        NotificationMessageHolderType messageHolder = new NotificationMessageHolderType();
        messageHolder.setTopic(topicExpression);
        messageHolder.setMessage("Hello there! The time is: " + new Date());
View Full Code Here

Examples of org.oasis_open.docs.wsn._2004._06.wsn_ws_basenotification_1_2_draft_01.TopicExpressionType

    private TopicExpressionConverter topicConverter = new TopicExpressionConverter();

    public void testConvert() {
        ActiveMQTopic topic1 = new ActiveMQTopic("Hello");
        TopicExpressionType type = topicConverter.toTopicExpression(topic1);
        ActiveMQTopic topic2 = topicConverter.toActiveMQTopic(type);
        assertEquals(topic1, topic2);
    }
View Full Code Here

Examples of org.oasis_open.docs.wsn.b_2.TopicExpressionType

    public TopicExpressionType toTopicExpression(ActiveMQTopic topic) {
        return toTopicExpression(topic.getPhysicalName());
    }

    public TopicExpressionType toTopicExpression(String name) {
        TopicExpressionType answer = new TopicExpressionType();
        answer.getContent().add(QName.valueOf(name));
        answer.setDialect(SIMPLE_DIALECT);
        return answer;
    }
View Full Code Here

Examples of org.oasis_open.docs.wsn.b_2.TopicExpressionType

    public Object getObject() throws Exception {
        Subscribe subscribe = new Subscribe();
        subscribe.setConsumerReference(AbstractWSAClient.createWSA(consumer));
        subscribe.setFilter(new FilterType());
        if (topic != null) {
            TopicExpressionType topicExp = new TopicExpressionType();
            topicExp.getContent().add(topic);
            subscribe.getFilter().getAny().add(
                    new JAXBElement<TopicExpressionType>(AbstractSubscription.QNAME_TOPIC_EXPRESSION,
                            TopicExpressionType.class, topicExp));
        }
        if (xpath != null) {
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.