Examples of GetSubscriptionResults


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

            !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

Examples of org.uddi.sub_v3.GetSubscriptionResults

    }
  }
  protected GetSubscriptionResults buildGetSubscriptionResults(Subscription subscription, Date endPoint)
    throws DispositionReportFaultMessage, DatatypeConfigurationException {
   
    GetSubscriptionResults getSubscriptionResults = null;
    Duration duration = TypeConvertor.convertStringToDuration(subscription.getNotificationInterval());
    Date startPoint = subscription.getLastNotified();
    Date nextDesiredNotificationDate = null;
    if (startPoint==null) startPoint = subscription.getCreateDate();
    nextDesiredNotificationDate = new Date(startPoint.getTime());
    duration.addTo(nextDesiredNotificationDate);
    //nextDesiredNotificationDate = lastTime + the Interval Duration, which should be:
    //AFTER the lastNotified time and BEFORE the endTime (current time). If it is
    //after the endTime, then the user does not want a notification yet, so we accumulate.
    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));
      if (log.isDebugEnabled()) log.debug("Period " + period.getStartPoint() + " " + period.getEndPoint());
      getSubscriptionResults.setCoveragePeriod(period);
    } else {
      log.debug("Client does not yet want a notification. The next desidered notification Date " + nextDesiredNotificationDate + ". The current interval ["
        + startPoint + " , " + endPoint + "] therefore skipping this notification cycle.");
      if (desiredDate==null || nextDesiredNotificationDate.getTime() < desiredDate.getTime()) {
        desiredDate = nextDesiredNotificationDate;
View Full Code Here

Examples of org.uddi.sub_v3.GetSubscriptionResults

                        sb.getBusinessEntity().add(be);
                        BusinessDetail saveBusiness = publicationJoe.saveBusiness(sb);

                        key = saveBusiness.getBusinessEntity().get(0).getBusinessKey();

                        GetSubscriptionResults gsr = new GetSubscriptionResults();
                        gsr.setAuthInfo(authInfoJoe);
                        gsr.setSubscriptionKey(null);
                        gsr.setCoveragePeriod(new CoveragePeriod());
                        GregorianCalendar gcal = new GregorianCalendar();
                        gcal.setTimeInMillis(System.currentTimeMillis());
                        gcal.add(Calendar.HOUR, -1);
                        gsr.getCoveragePeriod().setStartPoint(df.newXMLGregorianCalendar(gcal));
                        gcal = new GregorianCalendar();
                        gcal.setTimeInMillis(System.currentTimeMillis());
                        gsr.getCoveragePeriod().setEndPoint(df.newXMLGregorianCalendar(gcal));
                        tckSubscriptionJoe.subscription.getSubscriptionResults(gsr);
                        Assert.fail();
                } catch (Exception ex) {
                        //HandleException(ex);
                        //Assert.fail();
View Full Code Here

Examples of org.uddi.sub_v3.GetSubscriptionResults

                        be.getName().add(new Name("Test business", null));
                        sb.getBusinessEntity().add(be);
                        BusinessDetail saveBusiness = publicationJoe.saveBusiness(sb);

                        key = saveBusiness.getBusinessEntity().get(0).getBusinessKey();
                        GetSubscriptionResults gsr = new GetSubscriptionResults();
                        gsr.setAuthInfo(authInfoJoe);
                        gsr.setSubscriptionKey(data.value.get(0).getSubscriptionKey());
                        gsr.setCoveragePeriod(null);
                        tckSubscriptionJoe.subscription.getSubscriptionResults(gsr);
                        Assert.fail();
                } catch (Exception ex) {
                        //HandleException(ex);
                        //Assert.fail();
View Full Code Here

Examples of org.uddi.sub_v3.GetSubscriptionResults

                        be.getName().add(new Name("Test business", null));
                        sb.getBusinessEntity().add(be);
                        BusinessDetail saveBusiness = publicationJoe.saveBusiness(sb);
                        key = saveBusiness.getBusinessEntity().get(0).getBusinessKey();

                        GetSubscriptionResults gsr = new GetSubscriptionResults();
                        gsr.setAuthInfo(authInfoJoe);
                        gsr.setSubscriptionKey(data.value.get(0).getSubscriptionKey());
                        gsr.setCoveragePeriod(new CoveragePeriod());
                        GregorianCalendar gcal = new GregorianCalendar();
                        gcal.setTimeInMillis(System.currentTimeMillis());
                        gcal.add(Calendar.HOUR, -1);
                        gsr.getCoveragePeriod().setStartPoint(df.newXMLGregorianCalendar(gcal));
                        gcal = new GregorianCalendar();
                        gcal.setTimeInMillis(System.currentTimeMillis());
                        gsr.getCoveragePeriod().setEndPoint(df.newXMLGregorianCalendar(gcal));
                        SubscriptionResultsList subscriptionResults = tckSubscriptionJoe.subscription.getSubscriptionResults(gsr);
                        Assert.assertNotNull(subscriptionResults);
                        Assert.assertNotNull(subscriptionResults.getBusinessList());
                        Assert.assertNotNull(subscriptionResults.getCoveragePeriod());
                        Assert.assertNotNull(subscriptionResults.getBusinessList().getBusinessInfos());
View Full Code Here

Examples of org.uddi.sub_v3.GetSubscriptionResults

                         BusinessService bs = new BusinessService();
                         bs.getName().add(new Name("svc", null));
                         sb.getBusinessService().add(bs);
                         publicationJoe.saveService(sb);*/

                        GetSubscriptionResults gsr = new GetSubscriptionResults();
                        gsr.setAuthInfo(authInfoJoe);
                        gsr.setSubscriptionKey(data.value.get(0).getSubscriptionKey());
                        gsr.setCoveragePeriod(new CoveragePeriod());
                        GregorianCalendar gcal = new GregorianCalendar();
                        gcal.setTimeInMillis(System.currentTimeMillis());
                        gcal.add(Calendar.HOUR, -1);
                        gsr.getCoveragePeriod().setStartPoint(df.newXMLGregorianCalendar(gcal));
                        gcal = new GregorianCalendar();
                        gcal.setTimeInMillis(System.currentTimeMillis());
                        gsr.getCoveragePeriod().setEndPoint(df.newXMLGregorianCalendar(gcal));
                        SubscriptionResultsList subscriptionResults = tckSubscriptionJoe.subscription.getSubscriptionResults(gsr);
                        Assert.assertNotNull(subscriptionResults);
                        Assert.assertNull(subscriptionResults.getBusinessList());
                        Assert.assertNotNull(subscriptionResults.getCoveragePeriod());
                        Assert.assertNotNull(subscriptionResults.getServiceList());
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.