retrieve the data using xnode and .net api

hai all.
i have a table cases in sql server and i mapped it to tamino as a schema
schema_cases. The doc type is cases.

i am able to retrieve the data using the following url

http://localhost/tamino/landregistration/col_land?_XQL=//Cases

now i want the same xml document from .net how i can achieve this.

I did the following

TaminoConnection connection = new TaminoConnection(“http://localhost/tamino/landregistration”);

TaminoCommand command = connection.CreateCommand(“colland”);
connection.Open(TaminoConnectionMode.AutoCommit);

TaminoUri myuri = new TaminoUri(“./Cases”);
TaminoDocument doc = command.Retrieve(myuri);

i am getting the error message as

SoftwareAG.Tamino.Api.TaminoException: TANPIE0001: Retrieve operation failed: INOXME8554: No message received.

so please tell me how i can access the sql fields thru .net API

please its very urgent and any reply is appreciated in advance
schema_cases.tsd (7.96 KB)

The Retrieve method is for obtaining documents not performing queries.

You need to use the TaminoCommand.Query method to execute an XQuery. Please note that the .NET API only supports XQuery not X-Query.

An XQuery similar to:

for $x in input()/Cases return $x

You could try the queries in the interactive interface before putting them into the program.

Thanks Mark for looking into my problem.

the schema using xnode to map a table from xql.

the message INOXQE6310 tells that xquery cannot use with x-node or x-tension

so please tell me how i can overcome the situation.

  1. how i can retrieve the whole document from .net so that i can have xml document same as when i use
    http://localhost/tamino/landregistration/colland?_XQL=//Cases

  2. how i can query the db that using xnode.

thanks
regards Sreeju

I had not realised that XQuery could not be used.

The command used in the URL with _XQL is a query.

Are you able to obtain a document using the following URL?

http://localhost/tamino/landregistration/colland/Cases/@1

If you are then you may be able to Retrieve the same document using the .NET API.

Dear mark,

http://localhost/tamino/landregistration/colland/Cases/@1

is not working. i am getting noramal http page not found

but http://localhost/tamino/landregistration/colland?_XQL=//Cases is working fine . if i have 2 records in the database (sql) i am getting all the two rows.

so what will solve my issue

thanks for caring

regards sreeju

Dear Mark ,

I tried the following with .net

TaminoQuery query = new TaminoQuery (“input()/Cases”);
TaminoQueryResponse queryResponse = command.Query(query);
Response.Write(queryResponse.ReturnValue);
Response.Write(queryResponse.ErrorText);

and I got the following out put.

6310
INOXQE6310: Processing of data with X-Tension or X-Node mapping is not supported by XQuery

so really how i can continue…

Unfortunately it looks like you are unable to use the .NET API to do this.

You should be able to use the Java API to perform the X-Query that you need.

The forthcoming Tamino 4.4 should support XQuery on pure X-Node mapping. This would then allow the use of the .NET API to perform the queries.

hi

thank you for your reply.
now i will tell my requirements. I want to show one of my client a demonstration. They are the ministry organization for registering land.

ok, they have all existing application in vb and ms sql server. Using the same data i want to generate a pdf document for each land. for eg the pdf will have land details like current owner, previous owner, previous transactions etc. So i started the project with asp.net and tamino. At the very start itself the above problems were found .

ok, then can you please advice what can i do as the next step.

also please give me some sample code using java that will access the ms sql server and querying the db . please consider this as very important.

regards sreeju

Check out the TaminoAPI4J examples under:

[Tamino root]\SDK\TaminoAPI4J\examples\JavaTaminoAPIExamples.jar

expand the jar for source + class files. ProcessXMLGreeting has some simple code for accessing Tamino + performing a query.

ok, thanks mark kuschnir,

i want to make sure that there is any chance to use .net and xnode together. Is it possible to use the activex API together with .net. If so please tell me whether i can use activex API to query the documents mapped with xnode. Currently we told the client that we are using .net as the front end. so i want to make sure that there are any ways that we can use .net API and xnode

regards sreeju

I have never actually used the ActiveX API from .NET. In theory it should be possible to do so as it is COM based.

The ActiveX API does allow the user to perform X-Query statements which you need for XNODE.

Please note that the ActiveX API is fairly simple compared to the Java/.NET APIs in that it does some of the work in communicating with Tamino but leaves the processing of returned documents upto the user.

Something else came to mind but I wouldn’t really recommend this route.

You could actually program to the X-Machine Programming interface.

Dear mark,

thanks for your advices. You specified that you have something in mind that you wont recommend. please tell me what it it.
can you just post any specified example that using tamino , xnode and asp or asp.net. please send me some examples.

regarding x-Machine. please tell me how i can use with the situation. i will refer x machine documentation and come bach to you

regards sreeju

Programming to the X-Machine interface was what I was thinking of.

If you use something like tcpmon from axis.jar you would be able to see an exchange between the Java/.NET APIs and Tamino.

Try a simple XQuery (on non-XNODE data) as a test. Try inside and outside of a transaction. That should give you all that you need to be able to perform simple requests.

Dear mark

A very good day to you

i am managed to get tamino 4.4 and from today i am starting my project.

regards sreeju