Package org.jboss.ws.extensions.eventing.jaxws

Examples of org.jboss.ws.extensions.eventing.jaxws.SubscribeResponse


         request.setDelivery(delivery);
         request.setEndTo(delivery.getNotifyTo());
         request.setFilter(getDefaultFilter());
         //request.setExpires(new Date());

         SubscribeResponse subscribeResponse = eventSourcePort.subscribeOp(request);
         assertNotNull(subscribeResponse);

         AddressingProperties responseProps = getResponseProperties((BindingProvider)eventSourcePort);
         assertEquals(EventingConstants.SUBSCRIBE_RESPONSE_ACTION, responseProps.getAction().getURI().toString());
View Full Code Here


         request.setDelivery(delivery);
         request.setEndTo(delivery.getNotifyTo());
         request.setFilter(getDefaultFilter());
         //request.setExpires(new Date());

         SubscribeResponse subscribeResponse = eventSourcePort.subscribeOp(request);
         assertNotNull(subscribeResponse);

         AddressingProperties responseProps = getResponseProperties((BindingProvider)eventSourcePort);
         assertEquals(EventingConstants.SUBSCRIBE_RESPONSE_ACTION, responseProps.getAction().getURI().toString());
View Full Code Here

      request.setExpires(new Date(System.currentTimeMillis() - 1000 * 60 * 60)); // invalid lease time
      request.setFilter(getDefaultFilter());

      try
      {
         SubscribeResponse subscribeResponse = eventSourcePort.subscribeOp(request);
        fail("Subscription should fail due to invalid lease time");
      }
      catch (Exception e)
      {
         // ignore expected exception
View Full Code Here

      request.setExpires(new Date(System.currentTimeMillis() + EventingConstants.MAX_LEASE_TIME + 1000));
      request.setFilter(getDefaultFilter());

      try
      {
         SubscribeResponse subscribeResponse = eventSourcePort.subscribeOp(request);
         fail("Subscription should fail due to exceedd max lease time");
      }
      catch (Exception e)
      {
         // ignore expected exception
View Full Code Here

      //
      // To update the expiration for a subscription,
      // subscription managers MUST support requests to renew subscriptions.
      //
      SubscribeResponse response = doSubscribe();

      AddressingProperties requestProps =
            buildFollowupProperties(response, EventingConstants.RENEW_ACTION, eventSourceURI.toString());
      setRequestProperties((BindingProvider)managerPort, requestProps);

      Date oldLeaseTime = response.getExpires();
      Renew renewRequest = new Renew();
      RenewResponse renewResponse = managerPort.renewOp(renewRequest);
      assertNotNull(renewResponse);
      assertNotNull(renewResponse.getExpires());
      AddressingProperties responseProps = getResponseProperties((BindingProvider)managerPort);
View Full Code Here

   {
      //
      // If the subscription is valid and has not expired,
      // the subscription manager MUST reply with the actual lease time.
      //
      SubscribeResponse response = doSubscribe();

      AddressingProperties requestProps =
            buildFollowupProperties(response, EventingConstants.GET_STATUS_ACTION, eventSourceURI.toString());
      setRequestProperties((BindingProvider)managerPort, requestProps);

      Date expectedLeaseTime = response.getExpires();
      GetStatusResponse statusResponse = managerPort.getStatusOp(new GetStatus());

      assertNotNull(statusResponse);
      assertNotNull(statusResponse.getExpires());
View Full Code Here

      assertWSDLAccess();

      // Though subscriptions expire eventually, to minimize resources,
      // the subscribing event sink SHOULD explicitly delete a subscription
      // when it no longer wants notifications associated with the subscription.
      SubscribeResponse response = doSubscribe();

      AddressingProperties requestProps =
            buildFollowupProperties(response, EventingConstants.UNSUBSCRIBE_ACTION, eventSourceURI.toString());
      setRequestProperties((BindingProvider)managerPort, requestProps);
View Full Code Here

      return new JBossWSTestSetup(NotificationTestCase.class, "jaxws-wseventing.war");
   }

   public void testNotification() throws Exception {

      SubscribeResponse response = doSubscribe();

      Element payload = DOMUtils.parse(eventString);
      try
      {
         InitialContext iniCtx = getInitialContext();
View Full Code Here

   /**
    * Subscribe using a custom notification filter.
    */
   public void testSubscribe() throws Exception
   {
      SubscribeResponse subscribeResponse = doSubscribe("/SystemStatus/HostName/text()='localhost'");
      SysmonUtil.printSubscriptionDetails(subscribeResponse);
   }
View Full Code Here

   /**
    * Cancel subscription and check if it was really removed.
    */
   public void testUnsubscribe() throws Exception
   {
      SubscribeResponse subscribeResponse = doSubscribe(null);
      //SysmonUtil.printSubscriptionDetails(subscribeResponse);

      // addressing correlation
      AddressingProperties unsubscribeProps = SysmonUtil.buildFollowupProperties(subscribeResponse, EventingConstants.UNSUBSCRIBE_ACTION, eventSourceURI);
      SysmonUtil.setRequestProperties((BindingProvider)managementPort, unsubscribeProps);
View Full Code Here

TOP

Related Classes of org.jboss.ws.extensions.eventing.jaxws.SubscribeResponse

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.