[ 
https://issues.apache.org/jira/browse/SCOUT-69?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12670999#action_12670999
 ] 

Waldemar Kłaczyński commented on SCOUT-69:
------------------------------------------

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




> Do not search service bindings on the specification
> ---------------------------------------------------
>
>                 Key: SCOUT-69
>                 URL: https://issues.apache.org/jira/browse/SCOUT-69
>             Project: Scout
>          Issue Type: Bug
>    Affects Versions: 1.0rc2
>         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)
>            Reporter: Waldemar Kłaczyński
>            Assignee: Kurt T Stam
>
>             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 services!
>            

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to