Oracle Error Message
ORA-26872: must attach to an XStream outbound server before executing string function
Reason for the Error
An attempt was made to invoke the specified function before executing OCIXStreamOutAttach call.
Solution
Add OCIXStreamOutAttach call before the specified function.