Examples of GetSubscriptionResults


Examples of org.apache.juddi.datatype.request.GetSubscriptionResults

   *
   */
  public RegistryObject execute(RegistryObject regObject)
    throws RegistryException
  {
    GetSubscriptionResults request = (GetSubscriptionResults)regObject;
    String generic = request.getGeneric();

    // aquire a jUDDI datastore instance
    DataStore dataStore = DataStoreFactory.getDataStore();

    try
View Full Code Here

Examples of org.uddi.sub_v3.GetSubscriptionResults

    deleteSubscription(authInfoJoe, JOE_SUBSCRIPTION_KEY);
  }
 
  public void getJoePublisherSubscriptionResults(String authInfoJoe) {   
    try {
      GetSubscriptionResults getSubResultsIn = (GetSubscriptionResults)EntityCreator.buildFromDoc(JOE_SUBSCRIPTIONRESULTS_XML, "org.uddi.sub_v3");
      getSubResultsIn.setAuthInfo(authInfoJoe);
     
      SubscriptionResultsList result = subscription.getSubscriptionResults(getSubResultsIn);
      if (result == null)
        Assert.fail("Null result from getSubscriptionResults operation");
View Full Code Here

Examples of org.uddi.sub_v3.GetSubscriptionResults

    deleteSubscription(authInfoSam, SAM_SUBSCRIPTION3_KEY);
  }
 
  public void getSamSyndicatorSubscriptionResults(String authInfoSam) {   
    try {
      GetSubscriptionResults getSubResultsIn = (GetSubscriptionResults)EntityCreator.buildFromDoc(SAM_SUBSCRIPTIONRESULTS_XML, "org.uddi.sub_v3");
      getSubResultsIn.setAuthInfo(authInfoSam);
     
      SubscriptionResultsList result = subscription.getSubscriptionResults(getSubResultsIn);
      if (result == null)
        Assert.fail("Null result from getSubscriptionResults operation");
View Full Code Here

Examples of org.uddi.sub_v3.GetSubscriptionResults

   
  }
 
  public void getSamSyndicatorSubscriptionResultsWithChunkingOnFind(String authInfoSam) {   
    try {
      GetSubscriptionResults getSubResultsIn = (GetSubscriptionResults)EntityCreator.buildFromDoc(SAM_SUBSCRIPTIONRESULTS2_XML, "org.uddi.sub_v3");
      getSubResultsIn.setAuthInfo(authInfoSam);
     
      Subscription subIn = (Subscription)EntityCreator.buildFromDoc(SAM_SUBSCRIPTION2_XML, "org.uddi.sub_v3");
     
      int expectedIterations = FINDQUALIFIER_TMODEL_TOTAL / subIn.getMaxEntities();
      if (FINDQUALIFIER_TMODEL_TOTAL % subIn.getMaxEntities() >0)
        expectedIterations++;
     
      String chunkToken = "";
      int iterations = 0;
      while (chunkToken != null) {
        iterations++;
       
        getSubResultsIn.setChunkToken(chunkToken);
        SubscriptionResultsList result = subscription.getSubscriptionResults(getSubResultsIn);
        if (result == null)
          Assert.fail("Null result from getSubscriptionResults operation");
       
        TModelList tmodelList = result.getTModelList();
View Full Code Here

Examples of org.uddi.sub_v3.GetSubscriptionResults

   
  }
 
  public void getSamSyndicatorSubscriptionResultsWithChunkingOnGet(String authInfoSam) {
    try {
      GetSubscriptionResults getSubResultsIn = (GetSubscriptionResults)EntityCreator.buildFromDoc(SAM_SUBSCRIPTIONRESULTS3_XML, "org.uddi.sub_v3");
      getSubResultsIn.setAuthInfo(authInfoSam);
         
      Subscription subIn = (Subscription)EntityCreator.buildFromDoc(SAM_SUBSCRIPTION3_XML, "org.uddi.sub_v3");
     
      int expectedIterations = FINDQUALIFIER_TMODEL_TOTAL / subIn.getMaxEntities();
      if (FINDQUALIFIER_TMODEL_TOTAL % subIn.getMaxEntities() >0)
        expectedIterations++;
     
      String chunkToken = "";
      int iterations = 0;
      while (chunkToken != null) {
        iterations++;
       
        getSubResultsIn.setChunkToken(chunkToken);
        SubscriptionResultsList result = subscription.getSubscriptionResults(getSubResultsIn);
        if (result == null)
          Assert.fail("Null result from getSubscriptionResults operation");
       
        TModelDetail tmodelDetail = result.getTModelDetail();
View Full Code Here

Examples of org.uddi.sub_v3.GetSubscriptionResults

    HttpSession session = request.getSession();
    SubscriptionResponse response = new SubscriptionResponse();
 
    try {
      //Send a request to the listener serverNode
      GetSubscriptionResults getSubscriptionResults = new GetSubscriptionResults();
      getSubscriptionResults.setAuthInfo(userAuthToken);
      getSubscriptionResults.setSubscriptionKey(modelSubscription.getSubscriptionKey());
     
      XMLGregorianCalendar calendarStart = DatatypeFactory.newInstance().newXMLGregorianCalendar(modelSubscription.getCoverageStart());
      XMLGregorianCalendar calendarEnd = DatatypeFactory.newInstance().newXMLGregorianCalendar(modelSubscription.getCoverageEnd());
      CoveragePeriod coverage = new CoveragePeriod();
      coverage.setStartPoint(calendarStart);
      coverage.setEndPoint(calendarEnd);
      getSubscriptionResults.setCoveragePeriod(coverage);
     
      String authToken = (String) session.getAttribute("token-" + modelSubscription.getFromClerkName());
      getSubscriptionResults.setAuthInfo(authToken);
            SyncSubscription syncSubscription = new SyncSubscription();
            syncSubscription.getGetSubscriptionResultsList().add(getSubscriptionResults);
     
          Transport transport = WebHelper.getTransport(session.getServletContext());
             JUDDIApiPortType apiService = transport.getJUDDIApiService();
View Full Code Here

Examples of org.uddi.sub_v3.GetSubscriptionResults

    SubscriptionNotifier notifier = new SubscriptionNotifier();
    notifier.cancel();
    Collection<Subscription> subscriptions = notifier.getAllAsyncSubscriptions();
    Assert.assertEquals(1, subscriptions.size());
    Subscription subscription = subscriptions.iterator().next();
    GetSubscriptionResults getSubscriptionResults = notifier.buildGetSubscriptionResults(subscription, new Date());
    getSubscriptionResults.setSubscriptionKey(subscription.getSubscriptionKey());
    UddiEntityPublisher publisher = new UddiEntityPublisher();
    publisher.setAuthorizedName(subscription.getAuthorizedName());
    SubscriptionResultsList resultList = notifier.getSubscriptionImpl().getSubscriptionResults(getSubscriptionResults, publisher);
    //We're expecting a changed service (since it was added in the
    Assert.assertNotNull(resultList.getServiceList());
View Full Code Here

Examples of org.uddi.sub_v3.GetSubscriptionResults

     
      Collection<Subscription> subscriptions = getAllAsyncSubscriptions();
      for (Subscription subscription : subscriptions) {
        if (subscription.getExpiresAfter()==null || subscription.getExpiresAfter().getTime() > startTime) {
          try {
            GetSubscriptionResults getSubscriptionResults = buildGetSubscriptionResults(subscription, new Date(scheduledExecutionTime()));
            getSubscriptionResults.setSubscriptionKey(subscription.getSubscriptionKey());
            UddiEntityPublisher publisher = new UddiEntityPublisher();
            publisher.setAuthorizedName(subscription.getAuthorizedName());
            SubscriptionResultsList resultList = subscriptionImpl.getSubscriptionResults(getSubscriptionResults, publisher);
            if (resultListContainsChanges(resultList)) {
              log.info("We have a change and need to notify..");
View Full Code Here

Examples of org.uddi.sub_v3.GetSubscriptionResults

    }
  }
  protected GetSubscriptionResults buildGetSubscriptionResults(Subscription subscription, Date endPoint)
    throws DispositionReportFaultMessage, DatatypeConfigurationException {
   
    GetSubscriptionResults getSubscriptionResults = null;
    Date startPoint = subscription.getLastNotified();
    if (startPoint==null) startPoint = new Date(0);

    Duration duration = TypeConvertor.convertStringToDuration(subscription.getNotificationInterval());
    Date nextDesiredNotificationDate = new Date(startPoint.getTime());
    duration.addTo(nextDesiredNotificationDate);

    if (subscription.getLastNotified()==null || nextDesiredNotificationDate.after(startPoint) && nextDesiredNotificationDate.before(endPoint)) {
      getSubscriptionResults = new GetSubscriptionResults();
     
      CoveragePeriod period = new CoveragePeriod();
      GregorianCalendar calendar = new GregorianCalendar();
      calendar.setTimeInMillis(startPoint.getTime());
      period.setStartPoint(DatatypeFactory.newInstance().newXMLGregorianCalendar(calendar));
      calendar.setTimeInMillis(endPoint.getTime());
      period.setEndPoint(DatatypeFactory.newInstance().newXMLGregorianCalendar(calendar));
      getSubscriptionResults.setCoveragePeriod(period);
    }
    return getSubscriptionResults;
   
  }
View Full Code Here

Examples of org.uddi.sub_v3.GetSubscriptionResults

            !isTemporarilyDisabled(subscription.getSubscriptionKey())) {
          try {
            //build a query with a coverage period from the lastNotified time to
            //now (the scheduled Execution time)
            Date notificationDate = new Date(scheduledExecutionTime());
            GetSubscriptionResults getSubscriptionResults =
              buildGetSubscriptionResults(subscription, notificationDate);
            if (getSubscriptionResults!=null) {
              getSubscriptionResults.setSubscriptionKey(subscription.getSubscriptionKey());
              UddiEntityPublisher publisher = new UddiEntityPublisher();
              publisher.setAuthorizedName(subscription.getAuthorizedName());
              SubscriptionResultsList resultList = subscriptionImpl.getSubscriptionResults(getSubscriptionResults, publisher);
              if (resultListContainsChanges(resultList)) {
                log.debug("We have a change and need to notify " + subscription.getSubscriptionKey());
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.