IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.



#Automation


#Applicationintegration
#webMethods
#Integration
 View Only
  • 1.  How can I get Collectionnames?

    Posted 01/25/03 10:19 AM

    Hello,

    How can I get all Collectionnames that defined in a database? My programm shall give a choice of all available Collections in my database.

    Thanks
    Sven


    #webMethods-Tamino-XML-Server-APIs
    #webMethods
    #API-Management


  • 2.  RE: How can I get Collectionnames?

    Posted 01/27/03 09:41 AM

    You could use a query like this to get the information you need:

    http://server/tamino/database/ino:collection?_xql=xs:schema/@ino:docname[not(.~="ino*")]</pre><BR>You can issue this query from the API like any other query. The query will give you a list of elements like this:<pre class="ip-ubbcode-code-pre"><xs:schema ino:id="17" xmlns:xs="http://www.w3.org/2001/XMLSchema" ino:docname="xapplication3.1.3.2/PropCustomer" /> 
    <xs:schema ino:id="18" xmlns:xs="http://www.w3.org/2001/XMLSchema" ino:docname="xapplication3.1.3.2/patient" /> 
    <xs:schema ino:id="19" xmlns:xs="http://www.w3.org/2001/XMLSchema" ino:docname="xapplication3.1.3.2/invoice" />

    where the first part of the ino:docname attribute is the Collection and the second part (after the slash) is the Schema name.

    The query will ignore internal collections used by Tamino such as ino:vocabulary and ino:collection.

    HTH
    QueryColl.java (2.27 KB)


    #API-Management
    #webMethods
    #webMethods-Tamino-XML-Server-APIs


  • 3.  RE: How can I get Collectionnames?

    Posted 01/27/03 02:11 PM

    If you use the newer “Tamino API for Java”, then there is another way, which might help you with your requirements. There are two methods in the SchemaAccesors, which return all collection with TSD3 or TSD2 Schemas:

    Iterator TSchemaDefinition3Accessor.getCollectionNames()
    Iterator TSchemaDefinition2Accessor.getCollectionNames()

    Both return an Iterator over all collections in the database. As far as I know they return all collections including the internal collections (“ino:…”), but you might want to try this out by yourself.

    Similiar methods exists for getting a list of Schema names.


    #webMethods-Tamino-XML-Server-APIs
    #API-Management
    #webMethods


  • 4.  RE: How can I get Collectionnames?

    Posted 01/27/03 02:30 PM

    …so here’s a better example. Many thanks.
    QueryColl.java (1.66 KB)


    #webMethods-Tamino-XML-Server-APIs
    #API-Management
    #webMethods