Scout
  1. Scout
  2. SCOUT-69

Do not search service bindings on the specification

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.0rc2
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      java version "1.6.0_0"
      IcedTea6 1.4 (fedora-7.b12.fc10-i386) Runtime Environment (build 1.6.0_0-b12)
      OpenJDK Server VM (build 10.0-b19, mixed mode)

      Description

      ClassificationScheme classification = bqm.findClassificationSchemeByName(null, "saba-com:centrum:services:penpay-terminal:ver-1.00");
      SpecificationLink fSpecificationLink = blm.createSpecificationLink();
      Concept fconcept = blm.createConcept(classification, "Order number of books", "Number number");
      fconcept.setKey(classification.getKey());
      fSpecificationLink.setSpecificationObject(fconcept);

      RegistryObject registryObject = bqm.getRegistryObject("EA336660-EF42-11DD-A660-9C97145B13F6",LifeCycleManager.SERVICE);
      if(registryObject instanceof Service){
      Service service = (Service) registryObject;
      BulkResponse fServiceBindings = bqm.findServiceBindings(service.getKey(), null, null, Collections.singletonList(fSpecificationLink));

      Always return all service bimdings!

        Activity

        Hide
        Waldemar Kłaczyński added a comment -

        This can be easily remedied by adding features:

        in: ScoutJaxrUddiHelper

        public static TModelBag getTModelBagFromSpecyfications(Collection specifications) throws JAXRException {
        try {
        if (specifications == null || specifications.size()==0)
        return null;

        // Classifications
        TModelBag tbag = (TModelBag)(XmlObject.Factory.newInstance()).changeType(TModelBag.type);
        Iterator classiter = specifications.iterator();
        while (classiter.hasNext()) {
        SpecificationLink specyfication = (SpecificationLink) classiter.next();
        if (specyfication != null) {
        Concept scheme = (Concept) specyfication.getSpecificationObject();
        if (scheme != null){
        Key key = scheme.getKey();
        if (key != null && key.getId() != null)

        { tbag.addTModelKey(key.getId()); }

        }
        }
        }
        return tbag;
        } catch (Exception ud)

        { throw new JAXRException("Apache JAXR Impl:", ud); }

        }

        In: BusinessQueryManagerImpl

        public BulkResponse findServiceBindings(Key serviceKey,
        Collection findQualifiers,
        Collection classifications,
        Collection specifications) throws JAXRException
        {
        BulkResponseImpl blkRes = new BulkResponseImpl();

        IRegistry iRegistry = registryService.getRegistry();
        FindQualifiers juddiFindQualifiers = mapFindQualifiers(findQualifiers);

        try
        {

        BindingDetail l = iRegistry.findBinding(serviceKey.getId(),
        ScoutJaxrUddiHelper.getCategoryBagFromClassifications(classifications),

        ++ ScoutJaxrUddiHelper.getTModelBagFromSpecyfications(specifications),

        juddiFindQualifiers,registryService.getMaxRows());

        I think it may useful to you, especially as you have several versions of the same service binding

        Show
        Waldemar Kłaczyński added a comment - This can be easily remedied by adding features: in: ScoutJaxrUddiHelper public static TModelBag getTModelBagFromSpecyfications(Collection specifications) throws JAXRException { try { if (specifications == null || specifications.size()==0) return null; // Classifications TModelBag tbag = (TModelBag)(XmlObject.Factory.newInstance()).changeType(TModelBag.type); Iterator classiter = specifications.iterator(); while (classiter.hasNext()) { SpecificationLink specyfication = (SpecificationLink) classiter.next(); if (specyfication != null) { Concept scheme = (Concept) specyfication.getSpecificationObject(); if (scheme != null){ Key key = scheme.getKey(); if (key != null && key.getId() != null) { tbag.addTModelKey(key.getId()); } } } } return tbag; } catch (Exception ud) { throw new JAXRException("Apache JAXR Impl:", ud); } } In: BusinessQueryManagerImpl public BulkResponse findServiceBindings(Key serviceKey, Collection findQualifiers, Collection classifications, Collection specifications) throws JAXRException { BulkResponseImpl blkRes = new BulkResponseImpl(); IRegistry iRegistry = registryService.getRegistry(); FindQualifiers juddiFindQualifiers = mapFindQualifiers(findQualifiers); try { BindingDetail l = iRegistry.findBinding(serviceKey.getId(), ScoutJaxrUddiHelper.getCategoryBagFromClassifications(classifications), ++ ScoutJaxrUddiHelper.getTModelBagFromSpecyfications(specifications), juddiFindQualifiers,registryService.getMaxRows()); I think it may useful to you, especially as you have several versions of the same service binding
        Hide
        Kurt T Stam added a comment -

        Waldemar,

        Can you explain what it is you are trying to do? Note that I understand your explanation of the fix; so can you try explain the problem better for me?

        Thx,

        --Kurt

        Show
        Kurt T Stam added a comment - Waldemar, Can you explain what it is you are trying to do? Note that I understand your explanation of the fix; so can you try explain the problem better for me? Thx, --Kurt
        Hide
        Waldemar Kłaczyński added a comment - - edited

        This allows you to search for the key concept. Returns only those binding services, which have the same key concepts in the query with tModel instances binding services in JUddi.

        Show
        Waldemar Kłaczyński added a comment - - edited This allows you to search for the key concept. Returns only those binding services, which have the same key concepts in the query with tModel instances binding services in JUddi.
        Hide
        Kurt T Stam added a comment -

        Sorry Waldemar, I'm not sure how to read your description. Can you explain this a bit more? thx --Kurt

        Show
        Kurt T Stam added a comment - Sorry Waldemar, I'm not sure how to read your description. Can you explain this a bit more? thx --Kurt
        Hide
        Tom Cunningham added a comment -

        Still waiting for a reply from Waldemar on this (over a year). Moving to future release.

        Show
        Tom Cunningham added a comment - Still waiting for a reply from Waldemar on this (over a year). Moving to future release.

          People

          • Assignee:
            Kurt T Stam
            Reporter:
            Waldemar Kłaczyński
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:

              Development