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.  Tamino DataSet

    Posted Mon March 07, 2005 11:13 PM

    I tried to create a dataset using the following code from an aspx page.
    tb1.Text = “for $b in input()/Property/Address return {$b/State}{$b/Zip}{$b/City}”

    Dim adapter As TaminoDataAdapter
    Dim con As TaminoConnection
    Dim tcommand As TaminoCommand
    Dim ds As DataSet
    Dim reader As XmlTextReader
    Dim query2 As TaminoQuery

    Try

    con = New TaminoConnection(“http://192.168.10.99/tamino/Floricica”)

    tcommand = con.CreateCommand(“APISimpleSamples”)

    con.Open(TaminoConnectionMode.AutoCommit)

    adapter = New TaminoDataAdapter(tcommand)
    adapter.Behavior = TaminoAdapterBehavior.ReadOnly
    ds = New DataSet
    reader = New XmlTextReader(“c://inetpub//wwwroot//TestareTamino//alta_schema.xsd”)
    adapter.FillSchema(ds, reader)
    query2 = New TaminoQuery(tb1.Text)
    adapter.Fill(ds, query2)
    Dim tt As TaminoQueryResponse
    tt=adapter.Query.
    Label1.Text = adapter.Query.ToString()
    'countt.ToString()
    'Apasa.Text= count.ToString()
    DataGrid1.DataSource = ds
    DataGrid1.DataMember = “Address”
    DataGrid1.DataBind()
    con.Close()
    adapter.Dispose()
    Catch ex As Exception

    Label1.Text = ex.ToString()
    End Try

    and the dataset set seems to be empty.

    If I run the same code from a Windows form everythink is ok.
    Does anyone know what is the explanation?
    Thank you very much


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


  • 2.  RE: Tamino DataSet

    Posted Tue March 08, 2005 08:54 AM

    Am I right in thinking that the DataSet is just empty and that there is no exception thrown?


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


  • 3.  RE: Tamino DataSet

    Posted Tue March 08, 2005 10:48 AM

    Yes, is true.
    There is no exception thrown but the dataset is empty.


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


  • 4.  RE: Tamino DataSet

    Posted Tue March 08, 2005 01:19 PM

    Hi,
    I think your problem is an inconsistency between your xml data and your data binding. Your query produces “book” elements but you are trying to bind to “Address” elements.
    To be consistent you need to create schema (alta_schema.xsd) that defines “book” with child nodes “State”, “Zip” and “City”, then bind to “book” using

    DataGrid1.DataMember = "book"</pre><BR>You don't need to use the schema, so you could also delete the two lines:<BR><pre class="ip-ubbcode-code-pre">reader = New XmlTextReader("c://inetpub//wwwroot//TestareTamino//alta_schema.xsd")
    adapter.FillSchema(ds, reader)


    …but your binding must still match your data.
    Hope this is clear…


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


  • 5.  RE: Tamino DataSet

    Posted Wed March 09, 2005 09:25 AM

    If you associate a schema with a DataSet then that schema must match the struture of the data that will be populating the DataSet and not necessarily the data as it is in Tamino.

    For instance if you request a subset of a doctype from Tamino then the associated schema must match that subset of data (i.e. it is a “view”).


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