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.

 View Only
  • 1.  Problem with Multiple-Query nested

    Posted Wed July 23, 2003 11:10 AM

    X-Application Version: 4.1.1
    Tamino Version : 4.1.1
    Platform : Win2k
    WebContainer : Tamocat 4.1.18
    JDK Version : 1.4.1

    Hi everybody,

    I have a view page with the follow code …


    <xapp:form document=“documentoDocument”>


    <xapp:setvar name=“favorit1” >
    for $x in input()/city where $x/code=‘<xapp:display select=“/mydoc1/CityCode”/>’ return $x/CityName
    </xapp:setvar>
    <xapp:directcommand type=“read” collection=“mycollection” document=“conCity” arg=“${favorit1$}” schema=“city”/>

    <xapp:form document=“conCity”>
    <xapp:display select=“.” />
    </xapp:form>


    <xapp:setvar name=“favorit2” >
    for $x in input()/country where $x/code=‘<xapp:display select=“/mydoc1/CountryCode”/>’ return $x/CountryName
    </xapp:setvar>
    <xapp:directcommand type=“read” collection=“mycollection” document=“conCountry” arg=“${favorit1$}” schema=“country”/>

    <xapp:form document=“conCountry”>
    <xapp:display select=“.” />
    </xapp:form>

    <xapp:setvar name=“favorit3” >
    for $x in input()/department where $x/code=‘<xapp:display select=“/mydoc1/DeptCode”/>’ return $x/DeptName
    </xapp:setvar>
    <xapp:directcommand type=“read” collection=“mycollection” document=“conDept” arg=“${favorit3$}” schema=“department”/>

    <xapp:form document=“conDept”>
    <xapp:display select=“.” />
    </xapp:form>


    <xapp:setvar name=“favorit4” >
    for $x in input()/legal_state where $x/code=‘<xapp:display select=“/mydoc1/LegalStateCode”/>’ return $x/LegalStateName
    </xapp:setvar>
    <xapp:directcommand type=“read” collection=“mycollection” document=“conLegaState” arg=“${favorit4$}” schema=“legal_state”/>

    <xapp:form document=“conLegalState”>
    <xapp:display select=“.” />
    </xapp:form>


    </xapp:form>


    When I have more than three directcommand(type read) nested I have the next error message :

    Error!
    An error occurred in the application program. Please report the following problem to your webmaster.
    Error message: internal error
    Help message:
    Exception id: 999
    Exception Type: ApplicationException
    Stacktrace:


    XException: id = 999
    com.softwareag.xtools.xapplication.common.AssertionFailed
    ambiguous element: legal_state
    at com.softwareag.xtools.xapplication.businessdocument.SchemaSet.lookup(SchemaSet.java:85)
    at com.softwareag.xtools.xapplication.businessdocument.BusinessDocumentWorkspace.read(BusinessDocumentWorkspace.java:320)
    at com.softwareag.xtools.xapplication.plugin.StandardWorkspacePlugin.readDocument(StandardWorkspacePlugin.java:326)
    at com.softwareag.xtools.xapplication.plugin.StandardWorkspacePlugin.readDocument(StandardWorkspacePlugin.java:303)
    at sun.reflect.GeneratedMethodAccessor84.invoke(Unknown Source)
    .
    .
    .

    I hope that you could help me…

    Thanks in advance

    MTP


    #API-Management
    #Tamino
    #webMethods


  • 2.  RE: Problem with Multiple-Query nested

    Posted Wed July 23, 2003 11:40 AM

    Hello,

    I don’t think that the number of directcomand tag is the reason for your problem. According to the stacktrace, X-Application’s schema layer reports an ambiguous element ‘legal_state’.

    Could you post you schema / schemas you are using for your application to verify the occurrence of the reported ambiguity?

    A possible workaround could be to skip the schema attribute in this case if the schema for the document is not required (-> loop tags can not be used for this document).

    Bye,
    Christian.


    #API-Management
    #Tamino
    #webMethods


  • 3.  RE: Problem with Multiple-Query nested

    Posted Wed July 23, 2003 12:04 PM

    Hi Christian;

    You are here the schema for doctype “city” for country(code,CountryName),department(code,DeptName) and legal_state (code,LegalStateName) is same the follow :

    <?xml version = "1.0" encoding = "UTF-8"?>
    <xs:schema xmlns:xs = “http://www.w3.org/2001/XMLSchema” xmlns:tsd = “http://namespaces.softwareag.com/tamino/TaminoSchemaDefinition”>
    xs:annotation
    xs:appinfo
    <tsd:schemaInfo name = “city”>
    <tsd:collection name = “mycoll”></tsd:collection>
    <tsd:doctype name = “city”>
    tsd:logical
    tsd:contentclosed</tsd:content>
    </tsd:logical>
    </tsd:doctype>
    tsd:adminInfo
    tsd:versionTSD3</tsd:version>
    tsd:created2003-04-01T10:00:37.132+01:00</tsd:created>
    tsd:modified2003-04-01T10:00:37.132+01:00</tsd:modified>
    </tsd:adminInfo>
    </tsd:schemaInfo>
    </xs:appinfo>
    </xs:annotation>
    <xs:element name = “city”>
    xs:complexType
    xs:sequence
    <xs:element name = “code” type = “xs:string”></xs:element>
    <xs:element name = “CityName” type = “xs:string”></xs:element>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:schema>

    Thanks in advance…

    MTP


    #API-Management
    #Tamino
    #webMethods


  • 4.  RE: Problem with Multiple-Query nested

    Posted Wed July 23, 2003 12:29 PM

    Hello,

    Did you make a check if you skip the attribute ‘schema’ from the directcommand tag

    <xapp:directcommand type="read" collection="mycollection" document="conLegaState" arg="${favorit4$}" schema="legal_state"/>
    </pre><BR><BR>so the result is<BR><BR><pre class="ip-ubbcode-code-pre">
    <xapp:directcommand type="read" collection="mycollection" document="conLegaState" arg="${favorit4$}" />



    If this does not solve your problem, could you zip and post me your application for I can reproduce the error?

    Many thanks,
    bye Christian.


    #webMethods
    #Tamino
    #API-Management