Examples of SubscribeResponse


Examples of axis.com.ibm.www.xmlns.stdwip.web_services.WS_BaseNotification.SubscribeResponse

   public void testDestroyNotification(  )
   throws Exception
   {
      // Subscribe to a TerminationNotification Notification
      QName                 notifQName   = ResourceLifetime11Constants.TOPIC_QNAME_RESOURCE_TERMINATION;
      SubscribeResponse    sub_response =
         subscribe( notifQName, "http://127.0.0.1:" + NOTIFICATION_LISTENER_PORT );
      EndpointReferenceType subRef = sub_response.getSubscriptionReference(  );
      assertNotNull( subRef );
      assertTrue( AxisGenTypesUtils.getResourceId( subRef ).length(  ) != 0 );

      //test as a listener for events
      PortListen notificationListener = new PortListen( NOTIFICATION_LISTENER_PORT, LISTENER_TIMEOUT );
View Full Code Here

Examples of axis.com.ibm.www.xmlns.stdwip.web_services.WS_BaseNotification.SubscribeResponse

   throws Exception
   {
      //test as a listener for events
      PortListen         notificationListener = new PortListen( NOTIFICATION_LISTENER_PORT, LISTENER_TIMEOUT );

      SubscribeResponse sub_response =
         subscribe( ExampleConstants.RESOURCE_PROP_QNAME_BLOCK_SIZE,
                    "http://127.0.0.1:" + NOTIFICATION_LISTENER_PORT );

      testDiskPortSetResourcePropertiesUpdate(  );
      String incomingMessage = notificationListener.waitForIncomingMessage(  );
      assertFalse( "Incoming Message started with an Error.",
                   incomingMessage.startsWith( "ERROR" ) );

      EndpointReferenceType              subscriptionReference = sub_response.getSubscriptionReference(  );
      SubscriptionManagerHttpBindingStub subMgrBinding = getSubMgrBinding(  );
      assertNotNull( subMgrBinding );

      subMgrBinding.setResourceId( AxisGenTypesUtils.getResourceId( subscriptionReference ) );
View Full Code Here

Examples of axis.com.ibm.www.xmlns.stdwip.web_services.WS_BaseNotification.SubscribeResponse

   {
      // Subscribe to a BadSector Notification
      // The example Service, DiskWsdmServiceWSResource is written so as to emit this notification
      // every 5 seconds.
      QName                 badSectorQName = new QName( "http://com.xyz", "BadSector" );
      SubscribeResponse    sub_response =
         subscribe( badSectorQName, "http://127.0.0.1:" + NOTIFICATION_LISTENER_PORT );
      EndpointReferenceType subRef = sub_response.getSubscriptionReference(  );

      assertNotNull( subRef );

      //test as a listener for events
      PortListen notificationListener = new PortListen( NOTIFICATION_LISTENER_PORT, LISTENER_TIMEOUT );
View Full Code Here

Examples of axis.com.ibm.www.xmlns.stdwip.web_services.WS_BaseNotification.SubscribeResponse

    */
   public void testNotification(  )
   throws Exception
   {
      // Subscribe to a MUWS ResourceState property change
      SubscribeResponse sub_response =
         subscribe( Muws05Constants.RESOURCE_PROP_QNAME_RESOURCE_STATE,
                    this.getAxisBaseUrl(  ).toString(  ) );
      EndpointReferenceType rsSubRef = sub_response.getSubscriptionReference(  );

      //    Subscribe to a BlockSize property change
      //setup listener url for consumer endpoint url
      sub_response =
         subscribe( ExampleConstants.RESOURCE_PROP_QNAME_BLOCK_SIZE,
                    "http://127.0.0.1:" + NOTIFICATION_LISTENER_PORT );
      EndpointReferenceType bsSubRef = sub_response.getSubscriptionReference(  );
      assertNotNull( rsSubRef );
      assertNotNull( bsSubRef );

      // The two subscription references should be equal except for the ResourceID property
      assertTrue( rsSubRef.getAddress(  ).toString(  ).compareTo( bsSubRef.getAddress(  ).toString(  ) ) == 0 );
View Full Code Here

Examples of axis.com.ibm.www.xmlns.stdwip.web_services.WS_BaseNotification.SubscribeResponse

          RemoteException
   {
      //test as a listener for events
      PortListen         notificationListener = new PortListen( NOTIFICATION_LISTENER_PORT, 5000 );

      SubscribeResponse sub_response =
         subscribe( ExampleConstants.RESOURCE_PROP_QNAME_BLOCK_SIZE,
                    "http://127.0.0.1:" + NOTIFICATION_LISTENER_PORT );

      EndpointReferenceType              subscriptionReference = sub_response.getSubscriptionReference(  );

      SubscriptionManagerHttpBindingStub subMgrBinding = getSubMgrBinding(  );
      assertNotNull( subMgrBinding );

      subMgrBinding.setResourceId( AxisGenTypesUtils.getResourceId( subscriptionReference ) );
View Full Code Here

Examples of axis.com.ibm.www.xmlns.stdwip.web_services.WS_BaseNotification.SubscribeResponse

   throws Exception
   {
      //test as a listener for events
      PortListen         notificationListener = new PortListen( NOTIFICATION_LISTENER_PORT, 15000 );

      SubscribeResponse sub_response =
         subscribe( ExampleConstants.RESOURCE_PROP_QNAME_BLOCK_SIZE,
                    "http://127.0.0.1:" + NOTIFICATION_LISTENER_PORT );

      testDiskPortSetResourcePropertiesUpdate(  );
      String incomingMessage = notificationListener.waitForIncomingMessage(  );
      assertFalse( incomingMessage.startsWith( "ERROR" ) );

      EndpointReferenceType              subscriptionReference = sub_response.getSubscriptionReference(  );
      SubscriptionManagerHttpBindingStub subMgrBinding = getSubMgrBinding(  );
      assertNotNull( subMgrBinding );

      subMgrBinding.setResourceId( AxisGenTypesUtils.getResourceId( subscriptionReference ) );
View Full Code Here

Examples of axis.com.ibm.www.xmlns.stdwip.web_services.WS_BaseNotification.SubscribeResponse

      Iterator i = topicQNames.iterator(  );

      while ( i.hasNext(  ) )
      {
         QName                 q            = (QName) i.next(  );
         SubscribeResponse    sub_response = subscribe( q,
                                                         this.getAxisBaseUrl(  ).toString(  ) );
         EndpointReferenceType rsSubRef = sub_response.getSubscriptionReference(  );
         assertNotNull( rsSubRef );
      }
   }
View Full Code Here

Examples of axis.com.ibm.www.xmlns.stdwip.web_services.WS_BaseNotification.SubscribeResponse

      Iterator i = topicQNames.iterator(  );

      while ( i.hasNext(  ) )
      {
         QName                 q            = (QName) i.next(  );
         SubscribeResponse    sub_response = subscribe( q,
                                                         this.getAxisBaseUrl(  ).toString(  ) );
         EndpointReferenceType rsSubRef = sub_response.getSubscriptionReference(  );
         assertNotNull( rsSubRef );
      }
   }
View Full Code Here

Examples of axis.com.ibm.www.xmlns.stdwip.web_services.WS_BaseNotification.SubscribeResponse

          TopicPathDialectUnknownFaultType,
          RemoteException,
          MalformedURIException
   {
      //    Subscribe to a BlockSize property change
      SubscribeResponse sub_response =
         subscribe( ExampleConstants.RESOURCE_PROP_QNAME_BLOCK_SIZE,
                    this.getAxisBaseUrl(  ).toString(  ) );
      EndpointReferenceType bsSubRef = sub_response.getSubscriptionReference(  );
      assertNotNull( bsSubRef );
   }
View Full Code Here

Examples of axis.com.ibm.www.xmlns.stdwip.web_services.WS_BaseNotification.SubscribeResponse

      // Try to invoke any operation, should get UnkownResourceFault
      try
      {
         //    Subscribe to a BlockSize property change
         SubscribeResponse sub_response =
            subscribe( ExampleConstants.RESOURCE_PROP_QNAME_BLOCK_SIZE,
                       this.getAxisBaseUrl(  ).toString(  ) );
         fail( "Subscribe request succeeded on destroyed resource." );
      }
      catch ( ResourceUnknownFaultType af )
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.