Examples of NotificationMessageHolderType


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

        org.xmlsoap.schemas.soap.envelope.Envelope env = ed.getEnvelope();
        Body body = env.getBody();
        XmlObject[] arryStuff = XmlBeanUtils.getChildElements(body);
        NotifyDocument.Notify ele = (NotifyDocument.Notify) arryStuff[0];
       
        NotificationMessageHolderType noteMess = ele.getNotificationMessageArray(0);
    return noteMess;
  }
View Full Code Here

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

            assertTrue( "The SOAP Body does not contain a wrapped notification with a Notify element.",
                    notifyDoc instanceof NotifyDocument.Notify );
            NotifyDocument.Notify notify = (NotifyDocument.Notify) notifyDoc;

            //get contained management event
            NotificationMessageHolderType notificationMessageType = notify.getNotificationMessageArray( 0 );
            XmlObject message = notificationMessageType.getMessage();

            XmlObject mgmtEventElems[] = XmlBeanUtils.getChildElements( message,
                    new QName( MuwsConstants.NSURI_MUWS_PART1_SCHEMA, "ManagementEvent" ) );
            assertEquals( "The Notify element does not contain exactly one muws-p1-xs:ManagementEvent element.", 1,
                    mgmtEventElems.length );
View Full Code Here

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

      Body body = env.getBody();
      XmlObject[] arryStuff = XmlBeanUtils.getChildElements(body);
      if(arryStuff.length==0)
        return "Black";
      NotifyDocument.Notify ele = (NotifyDocument.Notify) arryStuff[0];
      NotificationMessageHolderType noteMess = ele.getNotificationMessageArray(0);
      XmlAnyTypeImpl mess = (XmlAnyTypeImpl)noteMess.getMessage();
      ManagementEventTypeImpl manEvt = (ManagementEventTypeImpl)XmlBeanUtils.getChildElements(mess)[0];
      //manEvt.get
      ResourcePropertyValueChangeNotificationTypeImpl propChngEvt = (ResourcePropertyValueChangeNotificationTypeImpl)XmlBeanUtils.getChildElements(manEvt)[0];
      NewValue newValue = propChngEvt.getNewValue();
//      XmlObject complience = (XmlObject)XmlBeanUtils.getChildElements(newValue)[0];
View Full Code Here

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

        EnvelopeDocument ed = (EnvelopeDocument) XmlObject.Factory.parse(messageText);
        org.xmlsoap.schemas.soap.envelope.Envelope env = ed.getEnvelope();
        Body body = env.getBody();
        XmlObject[] arryStuff = XmlBeanUtils.getChildElements(body);
        NotifyDocument.Notify ele = (NotifyDocument.Notify) arryStuff[0];
        NotificationMessageHolderType noteMess = ele.getNotificationMessageArray(0);
        XmlAnyTypeImpl mess = (XmlAnyTypeImpl) noteMess.getMessage();
        ManagementEventTypeImpl manEvt =
                (ManagementEventTypeImpl) XmlBeanUtils.getChildElements(mess)[0];
        return manEvt;
    }
View Full Code Here

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

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

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

            assertTrue( "The SOAP Body does not contain a wrapped notification with a Notify element.",
                    notifyDoc instanceof NotifyDocument.Notify );
            NotifyDocument.Notify notify = (NotifyDocument.Notify) notifyDoc;

            //get contained management event
            NotificationMessageHolderType notificationMessageType = notify.getNotificationMessageArray( 0 );
            XmlObject message = notificationMessageType.getMessage();

            XmlObject mgmtEventElems[] = XmlBeanUtils.getChildElements( message,
                    new QName( MuwsConstants.NSURI_MUWS_PART1_SCHEMA, "ManagementEvent" ) );
            assertEquals( "The Notify element does not contain exactly one muws-p1-xs:ManagementEvent element.", 1,
                    mgmtEventElems.length );
View Full Code Here

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

                                            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 ) );
      TopicExpressionType topicExprType =
         (TopicExpressionType) TopicsTypeWriter.newInstance( TopicsConstants.NSURI_WSTOP_SCHEMA ).toXmlObject( topicExpr,
                                                                                                               NotificationProducerPortType.PROP_QNAME_TOPIC );
      notifMsgHolder.setTopic( topicExprType );
      return notifyDoc;
   }
View Full Code Here

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

            dispatch(topic, createXml(text));
        }
    }

    protected void dispatch(TopicExpressionType topic, Object body) throws RemoteException {
        NotificationMessageHolderType messageHolder = new NotificationMessageHolderType();
        EndpointReferenceType producerReference = getProducerReference();
        if (producerReference != null) {
            messageHolder.setProducerReference(producerReference);
        }
        messageHolder.setTopic(topic);
        messageHolder.setMessage(body);

        List<NotificationMessageHolderType> list = new ArrayList<NotificationMessageHolderType>(1);
        list.add(messageHolder);
        notificationConsumer.notify(list);
    }
View Full Code Here

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

        ActiveMQConnection connection = broker.getConnection();
        Session session = connection.createSession(false, 0);
        ActiveMQTopic topic = new ActiveMQTopic("Test");
        MessageConsumer consumer = session.createConsumer(topic);

        NotificationMessageHolderType messageHolder = new NotificationMessageHolderType();
        messageHolder.setTopic(topicConverter.toTopicExpression(topic));
        messageHolder.setMessage(createMessage());

        List<NotificationMessageHolderType> list = new ArrayList<NotificationMessageHolderType>();
        list.add(messageHolder);

        broker.notify(list);
View Full Code Here

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

        // 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());

        List<NotificationMessageHolderType> list = new ArrayList<NotificationMessageHolderType>(1);
        list.add(messageHolder);

        broker.notify(list);
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.