Problem with calling "Insert" on ActiveX interface

I have problems with calling ?Insert? to put an XML document in a Tamino database. It does not succeed the first time I call ?Insert?. Being a persevering type of person I decided to call ?Insert? multiple times until it succeeds. The results are given below.

Called Insert the first time and got the ino:response back
<ino:message ino:returnvalue=“8554”><ino:messagetext ino:code=“INOXME8554”>No message received</ino:messagetext></ino:message>

Called Insert the second time and got the ino:response back
<ino:message ino:returnvalue=“0”>ino:messagelinedocument processing started</ino:messageline></ino:message><ino:message ino:returnvalue=“8702”><ino:messagetext ino:code=“INOXPE8702”>Invalid document prolog</ino:messagetext>ino:messagelineLine 3, Column 1: Invalid document prolog</ino:messageline></ino:message>

Called Insert the third time and got the ino:response back
<ino:message ino:returnvalue=“0”>ino:messagelinedocument processing started</ino:messageline></ino:message><ino:object ino:collection=“Play-Collection” ino:doctype=“PLAY” ino:id=“16”/><ino:message ino:returnvalue=“0”>ino:messagelinedocument processing ended</ino:messageline></ino:message>

Any idea why the function does not succeed on the first attempt?

Gavin