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

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


      catch ( Exception e )
      {
         throw new FaultException( Soap1_1Constants.FAULT_SERVER, "Internal server error." );
      }

      GetCurrentMessageResponseDocument                           responseDoc =
         GetCurrentMessageResponseDocument.Factory.newInstance(  );
      GetCurrentMessageResponseDocument.GetCurrentMessageResponse response =
         responseDoc.addNewGetCurrentMessageResponse(  );
      XmlBeanUtils.addChildElement( response, msgXBean );
      return responseDoc;
   }
View Full Code Here


   private XmlObject wrapMessageWithNotify( XmlObject msg )
   {
      NotifyDocument                notifyDoc      = NotifyDocument.Factory.newInstance(  );
      NotifyDocument.Notify         notify         = notifyDoc.addNewNotify(  );
      NotificationMessageHolderType notifMsgHolder = notify.addNewNotificationMessage(  );
      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

    System.out.println(messageText);
    messageText=hackAddNameSpace(messageText);
    System.out.println("Message Ends.");
    messagesJPanel1.setMessage(new WcmMessage(messageText, "","N"));
    try {
      NotificationMessageHolderType noteMess = getNotificationMessageHolder(messageText);     
      ManagementEventTypeImpl manEvt = parseManagementEvent(noteMess);       
      String optStatus = parseCurrentOperationalStatus(manEvt);
      EndpointReferenceType epr = parseSourceEpr(noteMess) ;
      //if(epr)
      System.out.println(""+epr.getAddress()+" Reports "+optStatus);
View Full Code Here

        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

            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

      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

        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

    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

            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

                                            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

TOP

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

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.