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.  Exception when using loop

    Posted 06/06/02 04:23 AM

    X-Application Version: 3.1.2
    Tamino Version : 3.1.1
    Platform : Solaris, …
    WebContainer : Tomcat 4.0.2
    JDK Version : 1.4

    I got the exception of
    ApplicationException: 999: Application Error! Please contact the X-Application-Team.
    com.softwareag.xtools.xapplication.businessdocument.InvalidSchemaException
    schema is non-deterministic

    when using Loop

    <%@ page language=“java” contentType=“text/html; charset=UTF-8” %>
    <%@ taglib uri=“404” prefix=“bdm” %>



    Loop Test



    <bdm:module id=“bdProp”>
    <bdm:form module=“bdProp”>
    <bdm:directcommand type=“query” schema=“dc” queryparm=“.~=‘*’” />
    </bdm:form>



    <bdm:browse module=“bdProp”>

    <bdm:loop module=“bdProp” select=“/dc” iterate=“Title” targetbase=“Titles”>



    </bdm:loop>

    </bdm:browse>

    <bdm:display select=“.” />

    </bdm:module>




    My tsd and sample data enclosed.

    Can anyone help?
    dc.tsd (10.8 KB)


    #webMethods
    #Tamino
    #API-Management


  • 2.  RE: Exception when using loop

    Posted 06/06/02 04:27 AM
    <?xml version="1.0" encoding="UTF-8"?>


    Title1
    Title2


    #API-Management
    #webMethods
    #Tamino


  • 3.  RE: Exception when using loop

    Posted 06/06/02 09:00 AM

    Hi,

    the problem with your schema definition is, that the parser cannot decided for a document like yours:



    whether

    <Title></pre> or <pre class="ip-ubbcode-code-pre"><dc></pre> is the occurring element.<BR>In this sense it's not deterministic and thus rejected. For a more detailed discussion of this topic please refer to <A HREF="http://tamino.forums.softwareag.com/viewtopic.php?p=12586" TARGET=_blank>non deterministic Schema topic</A><BR><BR>I adapted your schema by introducing a new enclosing element called <pre class="ip-ubbcode-code-pre">dcs</pre>, which contains a occurrence of <pre class="ip-ubbcode-code-pre">dc

    elements. I generated an application using the X-Application Generator and it worked.

    I hope that helps you.

    Please find attached the modified schema.

    Thank you for your contribution.

    Stefan Schwalm
    Software AG, Darmstadt
    dc2.tsd (11 KB)


    #webMethods
    #API-Management
    #Tamino


  • 4.  RE: Exception when using loop

    Posted 06/06/02 09:35 AM

    It works and display
    Title1
    Title2

    How about data as



    Title1
    Title2


    Title3
    Title4




    It does show Title3 and Title4?
    Any suggestion?


    #webMethods
    #API-Management
    #Tamino


  • 5.  RE: Exception when using loop

    Posted 06/06/02 09:38 AM

    I know the answer. We shall iterate dc.
    Thanks.


    #webMethods
    #Tamino
    #API-Management


  • 6.  RE: Exception when using loop

    Posted 06/06/02 11:53 AM

    Dear Schwalm,

    I really don’t understand why my scheme non-deterministic.
    You just add a node to my scheme and make it deterministic. Why?
    Can I find more information from SoftwareAG?

    Thanks.


    #API-Management
    #Tamino
    #webMethods


  • 7.  RE: Exception when using loop

    Posted 06/06/02 12:39 PM

    Hi again,

    ok here some more hints on the subject.
    The part in the schema defintion, which says something about deterministic schemas is:


    (for more details please see:
    XML Schema Defintion)

    As I wrote before it cannot be decided for a document like


    T1
    T2
    C1


    at the time T1 is read, whether T1 belongs to a occurrence or a occurrence.

    Since one has always the freedom to define an enclosing element and giving it a name, this restriction shouldn’t cause too much trouble when designing a schema.

    I hope I could help you.

    Cheers

    Stefan Schwalm
    Software AG, Darmstadt


    #Tamino
    #webMethods
    #API-Management


  • 8.  RE: Exception when using loop

    Posted 06/07/02 04:38 AM

    But I still don’t know why


    T1
    T2
    C1


    T21
    T22
    C21



    is ok?


    #webMethods
    #API-Management
    #Tamino


  • 9.  RE: Exception when using loop

    Posted 06/07/02 08:24 AM

    Hello,

    what Stefan tried to explain is that for







    The validating parser can not decide whether the document has the structure

    a) dc - begin sequence - title title title - end sequence

    or

    b) dc - begin sequence - title - end sequence - begin sequence - title title - end sequence

    or

    c) dc - begin sequence - title title - end sequence - begin sequence - title - end sequence

    or



    With the modification Stefan proposed, you specify with the element dc which variant you want. For example







    Bye,
    Christian.


    #API-Management
    #Tamino
    #webMethods