Examples of TopicExpressionType


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

   }

   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 + "' xmlns:"
                                                              + NSPREFIX2 + "='" + NSURI2
                                                              + "' Dialect='http://docs.oasis-open.org/wsn/2004/06/TopicExpression/Full'>"
                                                              + expr + "</wsnt:TopicExpression>" ) )
View Full Code Here

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

      notifMsgHolder.setMessage( msg );
      EndpointReference         producerEPR       =
         m_subscription.getProducerResource(  ).getEndpointReference(  );
      XmlBeansEndpointReference xBeansProducerEPR = ( (XmlBeansEndpointReference) producerEPR );
      notifMsgHolder.setProducerReference( (EndpointReferenceType) xBeansProducerEPR.getXmlObject( org.apache.ws.addressing.v2003_03.AddressingConstants.NSURI_ADDRESSING_SCHEMA ) );
      TopicExpressionType topicExpr =
         (TopicExpressionType) ( (XmlObjectWrapper) m_subscription.getTopicExpression(  ) ).getXmlObject(  );
      notifMsgHolder.setTopic( topicExpr );
      return notifyDoc;
   }
View Full Code Here

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

        instance.setTimeInMillis(instance.getTimeInMillis() + 7200000);
        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","S" );
        if ( ! ( response instanceof SubscribeResponseDocument.SubscribeResponse ) )
        {
            throw new FaultException( response.toString() );
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(m_consumerURL);
        TopicExpressionType topicExpr = subscribe.addNewTopicExpression();
        topicExpr.setDialect(TopicsConstants.TOPIC_EXPR_DIALECT_SIMPLE);
        XmlBeanUtils.setValueAsQName(topicExpr, m_topic);
        XmlObject response = m_portTypeImpl.subscribe(requestDoc);
        assertTrue(response instanceof SubscribeResponseDocument.SubscribeResponse);
        SubscribeResponseDocument.SubscribeResponse subscribeResponse = (SubscribeResponseDocument.SubscribeResponse) response;
        XmlBeansEndpointReference xmlBeansEndpointReference = new XmlBeansEndpointReference(subscribeResponse.getSubscriptionReference());
View Full Code Here

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

        //TODO check Calendar serializing
        s.setInitialTerminationTime(initialTerminationTime);
       
        //TODO multiple filters
        if(tf!=null){
            TopicExpressionType te = s.addNewTopicExpression();
            XmlCursor xc = te.newCursor();
            xc.toNextToken();
      xc.insertNamespace( "tns",tf.getNameSpace());
            te.newCursor().setTextValue((String)tf.getExpression());
            te.setDialect(tf.getURI().toString());
        }
       
        //create Subscription
        //add to local SubscriptionHome       
        org.apache.ws.notification.pubsub.Subscription ls = this.sH.create();        
View Full Code Here

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

        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 );
        msg = notifyDoc;
        return msg;
    }
View Full Code Here

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

    }

    private static void addSimpleTopic(QName rootTopicQName, ResourceProperty resourceProp)
    {
        TopicDocument topicDocument = TopicDocument.Factory.newInstance();
        TopicExpressionType topicExpressionType = topicDocument.addNewTopic();
        topicExpressionType.setDialect(TopicsConstants.TOPIC_EXPR_DIALECT_SIMPLE);
        XmlBeanUtils.setValueAsQName(topicExpressionType, rootTopicQName);
        resourceProp.add(topicDocument);
    }
View Full Code Here

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

    private static void addConcreteTopics(QName rootTopicQName, Topic subTopic, ResourceProperty resourceProp)
    {
        TopicDocument topicDocument = TopicDocument.Factory.newInstance();
        String topicName = subTopic.getName();
        QName concreteTopicName = new QName(rootTopicQName.getNamespaceURI(), rootTopicQName.getLocalPart() + "/" + topicName);
        TopicExpressionType topicExpressionType = topicDocument.addNewTopic();
        topicExpressionType.setDialect(TopicsConstants.TOPIC_EXPR_DIALECT_CONCRETE);
        XmlBeanUtils.setValueAsQName(topicExpressionType, concreteTopicName);
        resourceProp.add(topicDocument);
        Iterator iterator = subTopic.topicIterator();
        while (iterator.hasNext())
        {
View Full Code Here

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

     * @see NotificationProducerPortType#getCurrentMessage(org.oasisOpen.docs.wsn.x2004.x06.wsnWSBaseNotification12Draft01.GetCurrentMessageDocument)
     */
    public GetCurrentMessageResponseDocument getCurrentMessage( GetCurrentMessageDocument requestDoc )
    {
        GetCurrentMessageDocument.GetCurrentMessage request = requestDoc.getGetCurrentMessage();
        TopicExpressionType topicExprXmlBean = request.getTopic();
        TopicExpression topicExpr = new XmlBeansTopicExpression( topicExprXmlBean );
        Topic[] topics = evaluateTopicExpression( topicExpr );
        if ( topics.length == 0 )
        {
            throw new InvalidTopicExpressionFaultException( NAMESPACE_SET,
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
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.