Problems with TaminoClient and TaminoLib.js

Hi!

I try to access my Tamino Database via JScript using the TaminoLib.js file. I got the error message “TaminoClient is undefined”.

My code is like this:





<![CDATA[

function Load (evt)
{
var dbname=“http://localhost/tamino/BeispielDB/Beispiel”;
var QueryObj;
var QueryResult;
var itemSelected;
var xqlResult;
var QueryVal=‘root/Objekte’;
var pageSize=12;

QueryObj = new TaminoClient(dbname, pageSize, “user”, “pw”);
QueryResult = QueryObj.query(QueryVal);


What is wrong here? The TaminoClient function is defined in the TaminoLib.js file, so it should be known here!!!

Please help me
Katharina

Is the TaminoLib.js file in the same directory as your code?

You may use an absolute or relative path to define the location of TaminoLib.js.

Yes, it’s in the same directory! I also tried src=“./TaminoLib.js” and src=“c:/TaminoLib.js” but it also doesn’t work!

Could you try adding the following attribute to your tag?

language=“JavaScript”

This following file is a tiny part of the JScript test suite.

Does it work in your environment?
Test.zip (508 Bytes)

I also tried it with but it doesn’t work. The test.htm file accepts the TaminoLib.js file and there are no error messages. But it can’t recongnize the Tamino Version.

Curiouser and curiouser!

Which version of Tamino are you using?

Could you post a copy of the TaminoLib.js you have?

I have Tamino 4.1.4.1!

Here’s a copy of my TaminoLib.js:
TaminoLib.js (44.2 KB)

I don’t understand this at all. Your TaminoLib.js works OK in my environment. It also produces the following output when run with Test.htm:

URL: http://10.42.22.182/tamino/mydb/ino:etc

Tamino DB Version: 4.1.4.1

which is what I would expect. Maybe you need to alter your copy of Test.htm to pass in the user/password in the TaminoClient constructor?

I set my password and userId in the TaminoClient Constructor but it also doesn’t work!

If you type the following into a browser:

http://localhost/tamino/db/collection?_diagnose=version

are are you asked for your user/password or do you get to see the DB version (where “db” + “collection” are filled in as appropriate)?

This is what I get when typing
http://localhost/tamino/BeispielDB/Beispiel? diagnose=version
in the browser:

<?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)”>
- ino:request
<ino:diagnose ino:request-type=“version” />
</ino:request>
- ino:message
<ino:messageline ino:subject=“Version”>4.1.4.1</ino:messageline>
</ino:message>
</ino:response>

I suspect that supplying the redundant user/password in the TaminoClient constructor causes the interface not to work.

In Test.htm did you just try “new TaminoClient(dburl)”?

Ok,now the test.htm works. But why is the TaminoClient function from TaminoLib.js in my project unknown?

This is the whole code:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN"
http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd” [

]>



ASV-Funktion parseXML()
XML Daten aus Tamino Datenbank lesen!






XML-Inhalte mittels ASV-Funktion parseXML() in SVG einbinden


XML-Daten laden und darstellen





© by Dr. Thomas Meinike 2002

It might be because you are using an XML file? Have you tried your script from an HTML file?

It might appear to partly work in Internet Explorer because it is interpreting some of the HTML tags?

I put my script in a html file and now it works! But isn’t it possible to put it in a svg file like I did, because I want to create a graphic from my xml data.

I’m not at all familiar with SVG.

However, I suspect that you should be able to produce SVG from the script in your HTML page using document.write and get it to the browser in that way.

Also the JavaScript API can be used from ASP to help produce pages.

I will try it!

Thank you for helping me :wink: