Refrence element implementation using Tamino API

I’m using Tamino Api for java to access tamino.
The schema specified for the DB includs
reference elements(below XML document example).
When trying to insert new document to the DB
using eather DOM,JDOM or SAX ,the result accepted

NestedException:Tamino access failure (INOXPE8751: Storing an object of this mapping type is not permitted, Line 2, Column 82: Storing an object of this mapping type is not permitted )

The code(Used for JDOM) is:
XML=XML+“18888880” ;
StringReader stringReader=new StringReader(XML);

TXMLObject xmlObject=TXMLObject.newInstance(TDOMObjectModel.getInstance());
accessor = connection.newXMLObjectAccessor( TAccessLocation.newInstance( “JOB-LOG” ) ,
TJDOMObjectModel.getInstance() );

StringWriter stw = new StringWriter();
xmlObject.writeTo( stw );
response = accessor.insert( xmlObject );

The XML document generated by the JDOM parser is:
<?xml version="1.0" encoding="UTF-8"?>

Istead of :
<?xml version="1.0" encoding="windows-1255"?>


How can the wanted XML structure be created?

The first thing that I notice is that Tamino seems not to be able to do what you want. The explanation to error INOXPE8751 is “Storing an object wich is linked to another object is not permitted.”.

However, I’m not an expert in schemas. So I’ll try to find somebody else to help you.

Thanks for your replay,Christian.
Well,Tamino is able to hold referenced objects,the objects are linked whithin the schema definition,as explained on the tamino 3.1.1 documentation (Tamino Advanced Concepts) and i have been working with it for quite some time using microsoft’s MSXML3 and TaminoX ActiveX objects,it works fine,but i could’nt manage to do that with the Java Api,it seems to deform XML document structure when dealing with referenced objects.

First I would like to clarify a few things:
- Within your code I see the usage of two different object models (OM),
DOM for the xml object and JDOM for the accessor. This does not
hurt but you should be aware of the resulting effects.
Declaring the OM for the xml object defines how the object parses,
writes and holds the xml objects data, e.g. when you choose DOM the
xml object contains a DOM-tree underneath, uses a parser to create the
DOM-tree from an external representation and uses an DOM-writer for
generating the external representation.
Declaring the OM for the accessor defines the OM that will be used
for creating xml objects from Tamino responses. So, the xml objects
returned from a TResponse have the OM of the accessor.
So, where and which OM did you exchange?
- Your XML-String contains a “<<” which I think is a typo.

However, running your test on my machine (with the most actual
developing version!) does not fail and the xml output is this:
<?xml version="1.0" encoding="utf-8"?>

which seems to be ok. Could you please verify that with the result
from your xmlObject.writeTo( stw );

As you see an empty element is given with the short cut form:

which is semanticaly identical to

Unfortunatly this form (the later) caused problems within Tamino
and the API also preferred this form when writing DOM.
This has been fixed in Tamino XML Server Version
I think that MSXML3 generates the short cut form, so that the
problem dos not occur.

I recommend using the latest Tamino XML Server Version and also
the latest API version (packaged within the server version or
community download)