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.  Strange TResponse, TaminoClient like ?

    Posted Tue March 04, 2003 02:29 PM

    :eek:
    Hi folks,

    i have a problem with the TResponse i get with Tamino4J. Here is my environment:

    Platform: Windows
    tamino 3.1.2.1
    TaminoAPI4J: 3.1.2.4

    My problem is that i want to see all entries for my doctype “Kategorie”, so i use the a new XMLObjectAccessor to my db and do the query. But the format of the response is sort of strange, instead of getting single DOM Documents each containing one result (so i can do some iterating) i get one result in form of the response of the taminoClient API (ino:response/xql:result/…), containing all results in one Document. And this response object i get as often i got results for my query in my db.

    Here some details:
    ----------------------------------------------------------------

    Tamino Schema

    <xs:schema ino:id=“15” ino:docname=“EntwicklungV2/Repository” xmlns:xs=“XML Schema” xmlns:tsd=“http://namespaces.softwareag.com/tamino/TaminoSchemaDefinition”>

    <xs:element name=“Kategorie”>
    xs:complexType
    xs:sequence
    <xs:element name=“Name” type=“xs:string” />
    <xs:element name=“Beschreibung” type=“xs:string” />
    <xs:element ref=“VerwaltungsInfo” maxOccurs=“unbounded” />
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:schema>
    ----------------------------------------------------------------

    Code:

    //get accessor for query from database connection
    this.accessor = this.connection.newXMLObjectAccessor(
    TAccessLocation.newInstance( this.taminoCollection ),
    TDOMObjectModel.getInstance() );

    this.queryString = ?Kategorie sortall(Name)?;
    this.query = TQuery.newInstance ( this.queryString ) ;
    try {
    this.response = this.accessor.query( this.query );
    this.taminoResponseMessage = this.response.getReturnValue();
    }
    catch (Exception e) {

    }

    this.taminoIterator = this.response.getXMLObjectIterator();

    The iterator contains twice the tamino result listed below !!
    ----------------------------------------------------------------

    QueryString: Kategorie sortall(Name)
    ----------------------------------------------------------------

    Background:

    The connection (this.connection) is provided as parameter to the AccessTamino class, so the whole application works with one connection. It is instanciated once when the user is logged in.
    ----------------------------------------------------------------

    TaminoResponse:

    <?xml version="1.0" encoding="ISO-8859-1"?>
    <ino:response xmlns:ino=“http://namespaces.softwareag.com/tamino/response2” xmlns:xql=“XQL FAQ (XML Query Language - Frequently Asked Questions)”>
    xql:queryKategorie sortall(Name)</xql:query>
    <ino:message ino:returnvalue=“0”>
    ino:messagelineXQL Request processing</ino:messageline>
    </ino:message>
    xql:result

    Betragsdaten
    Beschreibung zur Kategorie Betragsdaten

    Neu
    2003-03-04
    15:23:12
    Tilly



    Vertragsdaten
    Beschreibung zur Kategorie Vertragsdaten

    Neu
    2003-03-03
    11:58:42
    Meier


    </xql:result>
    <ino:message ino:returnvalue=“0”>
    ino:messagelineXQL Request processed</ino:messageline>
    </ino:message>
    </ino:response>


    Tamino returns two XML Objects which contain both (!) the same content: both contain all results in the format of the response of the ?older? HTTP API (TaminoClient). Even the Iterator contains two identical Objects !!

    What’s wrong with my application ?? I already used the TaminoAPI4J and the response was totally different. Any hints or ideas ??


    Many thanks

    Dirk Holbeck


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


  • 2.  RE: Strange TResponse, TaminoClient like ?

    Posted Thu March 06, 2003 10:44 AM

    Hi Dirk,

    could it be that you use the document() method of the iterator items instead of the element() method. This would lead to exactly the behaviour you describe here.

    Cheers, Christian.


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


  • 3.  RE: Strange TResponse, TaminoClient like ?

    Posted Tue March 11, 2003 09:49 AM

    Hi Christian,

    what a great hint ! That’s exactly what i did !
    Many thanks,

    Dirk :slight_smile:


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