Package org.apache.cxf.ws.eventing

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


        AttributedURIType eventSinkAddr = new AttributedURIType();
        String url = TestUtil.generateRandomURLWithHttpTransport(NOTIFICATION_TEST_PORT);
        eventSinkAddr.setValue(url);
        eventSinkERT.setAddress(eventSinkAddr);
        subscribe.setDelivery(new DeliveryType());
        subscribe.getDelivery().getContent().add(new ObjectFactory().createNotifyTo(eventSinkERT));
       
        subscribe.setFilter(new FilterType());
        subscribe.getFilter().getContent().add("//*[local-name()='fire' and "
                + "namespace-uri()='http://www.events.com']/location[text()='Canada']");
View Full Code Here


        AttributedURIType eventSinkAddr = new AttributedURIType();
        String url = TestUtil.generateRandomURLWithHttpTransport(NOTIFICATION_TEST_PORT);
        eventSinkAddr.setValue(url);
        eventSinkERT.setAddress(eventSinkAddr);
        subscribe.setDelivery(new DeliveryType());
        subscribe.getDelivery().getContent().add(new ObjectFactory().createNotifyTo(eventSinkERT));

        subscribe.setFilter(new FilterType());
        subscribe.getFilter().getContent().add("/*[local-name()='fire']/location[text()='Russia']");

 
View Full Code Here

        AttributedURIType eventSinkAddr = new AttributedURIType();
        String url = TestUtil.generateRandomURLWithHttpTransport(NOTIFICATION_TEST_PORT);
        eventSinkAddr.setValue(url);
        eventSinkERT.setAddress(eventSinkAddr);
        subscribe.setDelivery(new DeliveryType());
        subscribe.getDelivery().getContent().add(new ObjectFactory().createNotifyTo(eventSinkERT));

        subscribe.setFilter(new FilterType());
        subscribe.getFilter().getContent()
                .add("//*[local-name()='earthquake']/location[text()='Russia']/"
 
View Full Code Here

        AttributedURIType eventSinkAddr = new AttributedURIType();
        String url = TestUtil.generateRandomURLWithHttpTransport(NOTIFICATION_TEST_PORT);
        eventSinkAddr.setValue(url);
        eventSinkERT.setAddress(eventSinkAddr);
        subscribe.setDelivery(new DeliveryType());
        subscribe.getDelivery().getContent().add(new ObjectFactory().createNotifyTo(eventSinkERT));

        eventSourceClient.subscribeOp(subscribe);

        Server eventSinkServer = createEventSink(url);
View Full Code Here

        Subscribe subscribe = new Subscribe();
        ExpirationType exp = new ExpirationType();
        exp.setValue(
                DurationAndDateUtil.convertToXMLString(DurationAndDateUtil.parseDurationOrTimestamp("PT0S")));
        subscribe.setExpires(exp);
        DeliveryType delivery = new DeliveryType();
        subscribe.setDelivery(delivery);

        subscribe.getDelivery().getContent().add(createDummyNotifyTo());

        SubscribeResponse resp = eventSourceClient.subscribeOp(subscribe);
        Assert.assertTrue(
                "Specification requires that EventSource return a xs:duration "
                        + "expirationType if a xs:duration was requested by client",
                DurationAndDateUtil.isDuration(resp.getGrantedExpires().getValue()));

        // we specify a xs:dateTime
        subscribe = new Subscribe();
        exp = new ExpirationType();
        XMLGregorianCalendar dateRequest =
                (XMLGregorianCalendar)DurationAndDateUtil.parseDurationOrTimestamp("2138-06-26T12:23:12.000-01:00");
        exp.setValue(DurationAndDateUtil.convertToXMLString(dateRequest));
        subscribe.setExpires(exp);
        delivery = new DeliveryType();
        subscribe.setDelivery(delivery);
        subscribe.getDelivery().getContent().add(createDummyNotifyTo());
        resp = eventSourceClient.subscribeOp(subscribe);
        Assert.assertTrue(
                "Specification requires that EventSource return a "
                        + "xs:dateTime expirationType if a xs:dateTime was requested by client",
                DurationAndDateUtil.isXMLGregorianCalendar(resp.getGrantedExpires().getValue()));
        XMLGregorianCalendar returned = DurationAndDateUtil.parseXMLGregorianCalendar(
                resp.getGrantedExpires().getValue());
        System.out.println("granted expiration: " + returned.normalize().toXMLFormat());
        System.out.println("requested expiration: " + dateRequest.normalize().toXMLFormat());
        Assert.assertTrue("Server should have returned exactly the same date as we requested",
                returned.equals(dateRequest));

        // we don't specify anything
        subscribe = new Subscribe();
        delivery = new DeliveryType();
        subscribe.setDelivery(delivery);
        subscribe.getDelivery().getContent().add(createDummyNotifyTo());
        resp = eventSourceClient.subscribeOp(subscribe);
        Assert.assertTrue(
                "Specification requires that EventSource return a xs:duration "
View Full Code Here

     */
    @Test
    public void testExpirationGrantingWithBestEffort() throws IOException {
        Subscribe subscribe = new Subscribe();
        ExpirationType exp = new ExpirationType();
        DeliveryType delivery = new DeliveryType();
        XMLGregorianCalendar dateRequest =
                (XMLGregorianCalendar)DurationAndDateUtil.parseDurationOrTimestamp("2138-06-26T12:23:12.000-01:00");
        exp.setValue(DurationAndDateUtil.convertToXMLString(dateRequest));
        exp.setBestEffort(true);
        subscribe.setExpires(exp);
View Full Code Here

    @Test
    public void cannotProcessFilter() throws IOException {
        Subscribe subscribe = new Subscribe();
        ExpirationType exp = new ExpirationType();
        DeliveryType delivery = new DeliveryType();
        XMLGregorianCalendar dateRequest =
                (XMLGregorianCalendar)DurationAndDateUtil.parseDurationOrTimestamp("2138-06-26T12:23:12.000-01:00");
        exp.setValue(DurationAndDateUtil.convertToXMLString(dateRequest));
        exp.setBestEffort(true);
        subscribe.setExpires(exp);
View Full Code Here

TOP

Related Classes of org.apache.cxf.ws.eventing.DeliveryType

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.