I’m trying to create new user, using Tamino API for java via conventional TConnectionFactory and XMLObjectAccessor and execute it using XQuery method but it fails to insert into the ino:security collection. The XQuery that I got here does not seem to be valid to TAMINO.
The XQuery i executed:
declare namespace ino=“http://namespaces.softwareag.com/tamino/response2” update insert <ino:user ino:userid=“TEST123” ino:unencryptedpassword=“TEST123” xmlns:ino=“http://namespaces.softwareag.com/tamino/response2”/> into input()/ino:user
The error:
NestedException:Tamino access failure (INOXDE7718, (cvc-type.3.1.2): invalid element content, Line 0, Column 0: [element “ino:user” in element “ino:user”])
If I executie that statement in Interactive Interface I will get the same error:
- <ino:message ino:returnvalue=“7718”>
<ino:messagetext ino:code=“INOXDE7718”>(cvc-type.3.1.2): invalid element content</ino:messagetext>
ino:messagelineLine 0, Column 0: [element “ino:user” in element “ino:user”]</ino:messageline>
</ino:message>
Is there any Admin functions in Tamino Java API that I can use to create/modify/delete users/groups/acls/aces??
Tks in advance
Hi Alvin,
The XQuery-Update expression you have supplied will update all ino:user documents by inserting a new ino:user as a child of these documents. Hence the response you get is correct. What you need to do is insert a new ino:user document with the _process command.
For updating the security information from the TaminoAPI4J just use the insert() or update() method of the TXMLObjectAccessor depending if users/groups/acls are being added or modified. For specific details on the schemas for security please refer to documentation under \Documentation\manager\security.htm.
Hope this helps.
Stuart Fyffe-Collins
Software AG (UK) Ltd.
Tks Stuart. To use the retrieve/update methods, I need to know the ino:id but how do i retrieve the ino:id from the document when i need to supply the retrieve method with one?
rgds
Alvin
Hello Alvin,
I don’t really understand the reason for needing the ino:id. If you want to query for a specific ino:user for example, then you could query with
_xql=ino:user[@ino:userid=“saguser1”]
Or am I missing something?
Stuart Fyffe-Collins
Software AG (UK) Ltd.
Hello Stuart,
The reason why I need ino:id is because I have to use Tamino API for Java and I’m using the update method of TXMLObjectAccessor. And this update method identify documents to be updated by their ino:id.
Anyway, I figured out that i have to use tamino getInoId function. to retrieve the ino:id. tks
Rgds
Alvin