webMethods

webMethods

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.

 View Only
  • 1.  Collection doctype list

    Posted Fri June 20, 2003 12:38 PM

    Hello!

    If you have two or more doctypes/collection, is there possible to get a list with their names using the TaminoAPI4J?

    Maybe using an accessor object because the accessor is created on a collection, so should have access to the whole collection.

    Thank you.


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


  • 2.  RE: Collection doctype list

    Posted Fri June 20, 2003 04:52 PM

    You could query the ino:collection collection looking for xs:schema documents.
    e.g. …/tamino/ino:collection?_xql=xs:schema//tsd:schemaInfo
    and extract the values of tsd:collection/@name and tsd:doctype/@name

    Hope this helps.

    Stuart Fyffe-Collins
    Software AG (UK) Ltd.


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


  • 3.  RE: Collection doctype list

    Posted Fri June 20, 2003 07:32 PM

    Hello!

    In addition to Stuart’s suggestion, there is an Accessor in the Tamino API for Java called “TSchemaDefinition3Accessor”. (One can be instantiated from a TConnection object using the newSchemaDefinition3Accessor method.)

    The TSchemaDefinition3Accessor has the following two methods:

       public java.util.Iterator getSchemaNames(java.lang.String collection)
    public java.util.Iterator getDoctypeNames(java.lang.String collection,
    java.lang.String schema)


    One or both of these methods will probably be helpful. For example: the Iterator returned from getSchemaNames() contains String objects, the values of which are the names of the schemas.
    (So there is no need to handle any DOM objects - just Java Strings.)

    Greetings,
    Trevor.


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


  • 4.  RE: Collection doctype list

    Posted Mon June 23, 2003 08:17 AM

    I understand that is posible to use TS2 schemas also with Tamino v3.x.
    I guess I won’t be able to use the TSchemaDefinition3Accessor with thoose schemas.


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


  • 5.  RE: Collection doctype list

    Posted Mon June 23, 2003 08:25 AM

    But I see that in the javadoc that I have a TSchemaDefinition2Accessor.
    So my problem is reduced now only at how to detect which schema TS2 or TS3 is used! Can I?


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