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

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


        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


        //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

        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

    }

    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

    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

     * @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

        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

        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

        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

        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

TOP

Related Classes of org.oasisOpen.docs.wsn.x2004.x06.wsnWSBaseNotification12Draft01.GetCurrentMessageDocument

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.