Package org.xmlsoap.schemas.ws._2003._03.addressing

Examples of org.xmlsoap.schemas.ws._2003._03.addressing.AttributedQName


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


      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

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

   {
      // 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 );
      assertTrue( rsSubRef.getPortType(  ).toString(  ).compareTo( bsSubRef.getPortType(  ).toString(  ) ) == 0 );

      //test as a listener for events
      PortListen notificationListener = new PortListen( NOTIFICATION_LISTENER_PORT, LISTENER_TIMEOUT );
      assertTrue( AxisGenTypesUtils.getResourceId( rsSubRef ).compareTo( AxisGenTypesUtils.getResourceId( bsSubRef ) ) != 0 );
View Full Code Here

      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

      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

      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

      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

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

      Subscribe request = new Subscribe(  );
      // Create an endpoint reference for the NotificationConsumer
      // Note that since we are using PortListener to handle notifications,
      // rather than a Web Service that implements NotificationConsumer this
      // EPR is somewhat bogus.
      EndpointReferenceType epr = new EndpointReferenceType(  );
      epr.setAddress( new AttributedURI( callback_url ) );
      epr.setPortType( new AttributedQName( "nothing" ) );
      ServiceNameType snt = new ServiceNameType(  );
      snt.setPortName( new NCName( "NotificationConsumer" ) );
      snt.set_value( new QName( "TestNotifConsumer" ) );
      epr.setServiceName( snt );

      // Set a couple of reference properties, including a ResourceID.
      MessageElement[] prop = new MessageElement[2];
      MessageElement   propsResourceID =
         new SOAPBodyElement( MuseAddressingConstants.REFERENCE_PROP_QNAME_RESOURCE_ID, "4444" );
      prop[0] = propsResourceID;
      MessageElement otherProp = new SOAPBodyElement( new QName( "http://com.xyz/props", "myprop" ),
                                                      "foo" );
      prop[1] = otherProp;
      ReferencePropertiesType props = new ReferencePropertiesType(  );
      props.set_any( prop );
      epr.setReferenceProperties( props );
      request.setConsumerReference( epr );

      // Build the TopicExpressionType for the request.
      TopicExpressionType tet = new TopicExpressionType(  );
View Full Code Here

TOP

Related Classes of org.xmlsoap.schemas.ws._2003._03.addressing.AttributedQName

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.