Update of documents in Tamino using XQuery in Mediator

Hi. I’m currently using mediator 7.3.1. I tried to use the TaminoQuery component to do an XQuery that updates certain docs in Tamino.
My Xquery text is something like
“update for $a in input()/GPTRecord
where $a/JobID={‘$JobID’}
do (
replace $a/JobStatus with (Processing)
)”

It will update correctly via mediator, but mediator will throw me an error

“HTTP Status 500 - Mediator Internal Error: No on_error sequence found. Exception: “com.softwareag.xbridge.exceptions.DocumentParseException: [Fatal Error] :1:111: The prefix “ino” for element “ino:object” is not bound.” in sequence “http://localhost:8080/Bizwork/Sequence/MA003A.xml” at line 17.”

I believed that this is due to the fact that mediator is unable to resolve the namespace for “ino” in the ino:object tag returned from the query.

May I know how to solve this problem?

Hi KooKie,
The error you are receiving is due to the accessor type you are using and that you are not suppressing the ino response wrapper. To overcome this, there are two solutions.
1.) You can change the accessor type to stream.
This will return the entire ino document to Mediator including the response wrapper nodes which contain the prefix and namespace definitions.
2.) Use the serlialization QPI in Tamino to suppress the response wrapper. To suppress the response wrapper you should add the following line to the beginning of your Xquery:
{?serialization method=“xml”?}
If you use X-Query, an Xpath based query language used in early versions of Tamino, there are no direct facilities to suppress the response wrapper.

Regards,

- Matthew G.