Examples of GetStatusResponse


Examples of org.apache.cxf.ws.eventing.GetStatusResponse

        subscribe.getDelivery().getContent().add(createDummyNotifyTo());
        SubscribeResponse resp = eventSourceClient.subscribeOp(subscribe);

        SubscriptionManagerEndpoint client = createSubscriptionManagerClient(
                resp.getSubscriptionManager().getReferenceParameters());
        GetStatusResponse response = client.getStatusOp(new GetStatus());
        System.out.println("EXPIRES: " + response.getGrantedExpires().getValue());
        Assert.assertTrue("GetStatus operation should return a XMLGregorianCalendar",
                DurationAndDateUtil.isXMLGregorianCalendar(response.getGrantedExpires().getValue()));
    }
View Full Code Here

Examples of org.apache.cxf.ws.eventing.GetStatusResponse

        subscribe.getDelivery().getContent().add(createDummyNotifyTo());
        SubscribeResponse resp = eventSourceClient.subscribeOp(subscribe);

        SubscriptionManagerEndpoint client = createSubscriptionManagerClient(
                resp.getSubscriptionManager().getReferenceParameters());
        GetStatusResponse response = client.getStatusOp(new GetStatus());
        String expirationBefore = response.getGrantedExpires().getValue();
        System.out.println("EXPIRES before renew: " + expirationBefore);
        Assert.assertTrue(expirationBefore.length() > 0);

        Renew renewRequest = new Renew();
        ExpirationType renewExp = new ExpirationType();
        renewExp.setValue(DurationAndDateUtil
                .convertToXMLString(DurationAndDateUtil.
                        parseDurationOrTimestamp("2056-10-21T14:54:46.826+02:00")))// 10 minutes
        renewRequest.setExpires(renewExp);
        client.renewOp(renewRequest);
        response = client.getStatusOp(new GetStatus());
        String expirationAfter = response.getGrantedExpires().getValue();
        System.out.println("EXPIRES after renew: " + expirationAfter);

        Assert.assertFalse("Renew request should change the expiration time at least a bit",
                expirationAfter.equals(expirationBefore));
    }
View Full Code Here

Examples of org.apache.cxf.ws.eventing.GetStatusResponse

        subscribe.getDelivery().getContent().add(createDummyNotifyTo());
        SubscribeResponse resp = eventSourceClient.subscribeOp(subscribe);

        SubscriptionManagerEndpoint client = createSubscriptionManagerClient(
                resp.getSubscriptionManager().getReferenceParameters());
        GetStatusResponse response = client.getStatusOp(new GetStatus());
        String expirationBefore = response.getGrantedExpires().getValue();
        System.out.println("EXPIRES before renew: " + expirationBefore);
        Assert.assertTrue(expirationBefore.length() > 0);

        Renew renewRequest = new Renew();
        ExpirationType renewExp = new ExpirationType();
        renewExp.setValue(DurationAndDateUtil
                .convertToXMLString(DurationAndDateUtil.parseDurationOrTimestamp("PT10M0S")))// 10 minutes
        renewRequest.setExpires(renewExp);
        client.renewOp(renewRequest);
        response = client.getStatusOp(new GetStatus());
        String expirationAfter = response.getGrantedExpires().getValue();
        System.out.println("EXPIRES after renew: " + expirationAfter);

        Assert.assertFalse("Renew request should change the expiration time at least a bit",
                expirationAfter.equals(expirationBefore));
    }
View Full Code Here

Examples of org.apache.cxf.ws.eventing.GetStatusResponse

    @Override
    public GetStatusResponse getStatusOp(GetStatus body) {
        String uuid = retrieveSubscriptionUUID();
        LOG.info("received GetStatus message for UUID=" + uuid);
        SubscriptionTicket ticket = obtainTicketFromDatabaseOrThrowFault(uuid);
        GetStatusResponse response = new GetStatusResponse();
        response.setGrantedExpires(
                DurationAndDateUtil.toExpirationTypeContainingGregorianCalendar(ticket.getExpires()));
        return response;
    }
View Full Code Here

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

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

      AddressingProperties responseProps = getResponseProperties((BindingProvider)managerPort);
      assertEquals(responseProps.getAction().getURI().toString(), EventingConstants.GET_STATUS_RESPONSE_ACTION);
      assertEquals("Incorrect lease time", expectedLeaseTime, statusResponse.getExpires());
   }
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.