Examples of SubscribeResponse


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

      // useNotify == true indicates that the Notification will be wrapped in a wsnt:Notify element.
      request.setUseNotify( new Boolean( true ) );

      // Issue the actual request to subscribe
      SubscribeResponse response = m_stub.subscribe( request );

      return response;
   }
View Full Code Here

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

         EndpointReferenceType     sensorEpr = endpointReferences[i];
         SensorSoapHttpBindingStub sensor = getSensorService( sensorEpr );

         // build the request to subscribe to the sensor services' change notifications
         Subscribe         subscribeRequest  = buildSubscribe( sensorEpr );
         SubscribeResponse subscribeResponse = sensor.subscribe( subscribeRequest );

         // the subscription request succeeded - remember the EPR to the new subscription in case we need to unsubscribe
         m_subscriptions.add( subscribeResponse.getSubscriptionReference(  ) );
      }

      return;
   }
View Full Code Here

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

                    expires);

            resp.getWriter().append("<h3>Subscription request</h3>");
            resp.getWriter().append(convertJAXBElementToStringAndEscapeHTML(sub));

            SubscribeResponse subscribeResponse = requestorClient.subscribeOp(sub);

            resp.getWriter().append("<h3>Response from Event Source</h3>");
            resp.getWriter().append(convertJAXBElementToStringAndEscapeHTML(subscribeResponse));

            resp.getWriter().append("<br/><a href=\"index.jsp\">Back to main page</a>");
View Full Code Here

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

        String endToURL = TestUtil.generateRandomURLWithLocalTransport();
        endToAddr.setValue(endToURL);
        endToERT.setAddress(endToAddr);
        subscribe.setEndTo(endToERT);

        SubscribeResponse response = eventSourceClient.subscribeOp(subscribe);
        Element referenceParams = (Element)response.getSubscriptionManager()
                .getReferenceParameters().getAny().get(0);

        Server endToEndpoint = createEndToEndpointWithReferenceParametersAssertion(endToURL, myParams);

        TestingEndToEndpointImpl.RECEIVED_ENDS.set(0);
View Full Code Here

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

        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 "
                        + "expirationType if no specific expirationType was requested by client",
                DurationAndDateUtil.isDuration(resp.getGrantedExpires().getValue()));
    }
View Full Code Here

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

        exp.setValue(DurationAndDateUtil.convertToXMLString(dateRequest));
        exp.setBestEffort(true);
        subscribe.setExpires(exp);
        subscribe.setDelivery(delivery);
        subscribe.getDelivery().getContent().add(createDummyNotifyTo());
        SubscribeResponse 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()));
    }
View Full Code Here

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

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

        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.SubscribeResponse

                DurationAndDateUtil.convertToXMLString(DurationAndDateUtil.parseDurationOrTimestamp("PT0S")));
        subscribe.setExpires(exp);
        DeliveryType delivery = new DeliveryType();
        subscribe.setDelivery(delivery);
        subscribe.getDelivery().getContent().add(createDummyNotifyTo());
        SubscribeResponse subscribeResponse = eventSourceClient.subscribeOp(subscribe);

        SubscriptionManagerEndpoint client = createSubscriptionManagerClient(
                subscribeResponse.getSubscriptionManager().getReferenceParameters());
        UnsubscribeResponse unsubscribeResponse = client.unsubscribeOp(new Unsubscribe());
        Assert.assertNotNull(unsubscribeResponse);

        try {
            client.getStatusOp(new GetStatus());
View Full Code Here

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

                        .parseDurationOrTimestamp("2018-10-21T14:52:46.826+02:00")))// 5 minutes
        subscribe.setExpires(exp);
        DeliveryType delivery = new DeliveryType();
        subscribe.setDelivery(delivery);
        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);
View Full Code Here

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

                .convertToXMLString(DurationAndDateUtil.parseDurationOrTimestamp("PT5M0S")))// 5 minutes
        subscribe.setExpires(exp);
        DeliveryType delivery = new DeliveryType();
        subscribe.setDelivery(delivery);
        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);
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.