A quick way to solve this would be to modify the xquery function from
declare function xf:one($eAIMESSAGE1 as element(ns0:EAIMESSAGE))
declare function xf:one($eAIMESSAGE1 as element(*)) and pass the input as $body/*
The input xml which you are passing now to the xquery is $body I suppose. You may have to pass $body/*.
The input xml for the xquery should be of the format
<EAIMESSAGE xmlns "http://www.example.org>
but the input which you are passing is not <EAIMESSAGE>
instead the input which you are passing is
hence the error.
I have resolved the issue by assigning eaiMessage1=$body/* to the Xquery function, initially i was giving only eaiMessage1=$body, which was causing the issue.
$body/* solved my issue according to the answer given by Guru Anuj Dwiwedi on: Problem with Xquery transformation in OSB
Edited by: user9223904 on Apr 2, 2013 2:17 AM