writing big text to file

I am trying to write big text (xml pasing by webservice to CU) to a file. It type conversion error error when i try to write through output stream

ostream.WriteText(input);

if i use write then it says invalid file mode…

any help?

reagards,

Why do you read this XML stream into a bigtext instead of an XMLport or XMLDOM automation variable?

Please explain what exactly you want to achieve.