You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@juddi.apache.org by "Steve Viens (JIRA)" <ju...@ws.apache.org> on 2005/02/02 03:22:18 UTC

[jira] Closed: (JUDDI-43) IdentifierBag and CategoryBag should not be empty

     [ http://issues.apache.org/jira/browse/JUDDI-43?page=history ]
     
Steve Viens closed JUDDI-43:
----------------------------

     Resolution: Fixed
    Fix Version: 0.9

This bug (actually two) has been confirmed and the proposed fixes has been applied. Thanks to Jeff Zhang for submitting this.


> IdentifierBag and CategoryBag should not be empty
> -------------------------------------------------
>
>          Key: JUDDI-43
>          URL: http://issues.apache.org/jira/browse/JUDDI-43
>      Project: jUDDI
>         Type: Bug
>     Versions: 0.9rc3
>     Reporter: Jeff Zhang
>     Assignee: Steve Viens
>      Fix For: 0.9

>
> If we look uddi_v2.xsd,
> 	<xsd:complexType name="categoryBag">
> 		<xsd:sequence>
> 			<xsd:element ref="uddi:keyedReference" maxOccurs="unbounded"/>
> 		</xsd:sequence>
> 	</xsd:complexType>
> 	<xsd:complexType name="identifierBag">
> 		<xsd:sequence>
> 			<xsd:element ref="uddi:keyedReference" maxOccurs="unbounded"/>
> 		</xsd:sequence>
> 	</xsd:complexType>
> we need a keyedReference at least in categoryBag or identifierBag.
> In fetchBusiness mathod of JDBCDataStore.java(src\java\org\apache\juddi\datastore\jdbc). jUDDI get infomation from database, and create the struct:
> <         IdentifierBag identifierBag = new IdentifierBag();
> <         identifierBag.setKeyedReferenceVector(BusinessIdentifierTable.select(businessKey,connection));
> <         business.setIdentifierBag(identifierBag);
> <
> <         CategoryBag categoryBag = new CategoryBag();
> <         categoryBag.setKeyedReferenceVector(BusinessCategoryTable.select(businessKey,connection));
> <         business.setCategoryBag(categoryBag);
> It's wrong if database table doesn't contain IdentifierTable and CategoryTable. It should be:
> >         Vector identVector = BusinessIdentifierTable.select(businessKey,connection);
> >         if (identVector.size() > 0)
> >         {
> >             IdentifierBag identifierBag = new IdentifierBag();
> >             identifierBag.setKeyedReferenceVector(identVector);
> >             business.setIdentifierBag(identifierBag);
> >         }
> >         Vector categoryVector = BusinessCategoryTable.select(businessKey,connection);
> >         if (categoryVector.size() > 0)
> >         {
> >             CategoryBag categoryBag = new CategoryBag();
> >             categoryBag.setKeyedReferenceVector(categoryVector);
> >             business.setCategoryBag(categoryBag);
> >         }
> and in fetchService method, we should do same thing:
> <         CategoryBag bag = new CategoryBag();
> <         bag.setKeyedReferenceVector(ServiceCategoryTable.select(serviceKey,connection));
> <         service.setCategoryBag(bag);
> ---
> >
> >         Vector categoryVector = ServiceCategoryTable.select(serviceKey,connection);
> >         if (categoryVector.size() > 0)
> >         {
> >             CategoryBag bag = new CategoryBag();
> >             bag.setKeyedReferenceVector(categoryVector);
> >             service.setCategoryBag(bag);
> >         }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira