Package org.oasisOpen.docs.wsn.x2004.x06.wsnWSBaseNotification12Draft01

Examples of org.oasisOpen.docs.wsn.x2004.x06.wsnWSBaseNotification12Draft01.SubscribeDocument$Factory


        EndpointReferenceType epr1 = EndpointReferenceType.Factory.newInstance();
        AttributedURI uri = AttributedURI.Factory.newInstance();
        uri.setStringValue("http://consumer");
        epr1.setAddress(uri);
        EndpointReference epr = new XmlBeansEndpointReference(epr1);
        TopicExpressionDocument topicExprType = null;
        try
        {
            topicExprType = (TopicExpressionDocument) XmlObject.Factory.parse("<wsnt:TopicExpression xmlns:wsnt=\"http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd\" Dialect=\"http://docs.oasis-open.org/wsn/2004/06/TopicExpression/Simple\">fs:MountPointDirectory</wsnt:TopicExpression>");
        }
        catch (XmlException e)
        {
            e.printStackTrace();
        }
        //topicExprType.setDialect("http://foobar");

        XmlBeansTopicExpression topicExpr = new XmlBeansTopicExpression(topicExprType.getTopicExpression());
        SubscriptionResource sub = new SubscriptionResource(epr,epr,null,"my/producer/home",topicExpr);
        sub.setNotificationProducer(new NotifProducer());

       /* EndpointReference consumerReference, EndpointReference producerReference,
                                    Calendar initialTerminationTime, Object policy, QueryExpression precondition,
View Full Code Here


         throw new IllegalArgumentException( "Unsupported property: " + propName );
      }

      if ( prop.isEmpty(  ) )
      {
         TopicExpressionDocument topicExprDoc = TopicExpressionDocument.Factory.newInstance(  );
         topicExprDoc.addNewTopicExpression(  );
         prop.add( topicExprDoc );
      }

      TopicExpressionType topicExpr        = (TopicExpressionType) prop.get( 0 );
      TopicsTypeWriter    topicsTypeWriter = TopicsTypeWriter.newInstance( TopicsConstants.NSURI_WSTOP_SCHEMA );
View Full Code Here

      }
      catch ( ClassCastException cce )
      {
         if ( xBean instanceof TopicExpressionDocument )
         {
            TopicExpressionDocument topicExpressionDoc = (TopicExpressionDocument) xBean;
            topicExpressionType = topicExpressionDoc.getTopicExpression(  );
         }
         else
         {
            throw new IllegalArgumentException(  );
         }
View Full Code Here

      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

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

      String        topicName         = subTopic.getName(  );
      QName         concreteTopicName =
         new QName( rootTopicName.getNamespaceURI(  ), rootTopicName.getLocalPart(  ) + "/" + topicName );
      if ( subTopic.isVisible(  ) )
      {
         TopicExpressionType topicExpressionType = topicDocument.addNewTopic(  );
         topicExpressionType.setDialect( TopicsConstants.TOPIC_EXPR_DIALECT_CONCRETE );
         XmlBeanUtils.setValueAsQName( topicExpressionType, concreteTopicName );
         topicProp.add( topicDocument );
      }

      Iterator iterator = subTopic.topicIterator(  );
View Full Code Here

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

   }

   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

   }

   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

   }

   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

TOP

Related Classes of org.oasisOpen.docs.wsn.x2004.x06.wsnWSBaseNotification12Draft01.SubscribeDocument$Factory

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.