ExchangeMessageWriter.BeginWrite

Syntax:

BeginWrite(<WriteXML>, <Node>)

Parameters:

<WriteXML> (required)

Type: DOMNodeWriter, FastInfosetWriter, XMLWriter.
An object that is used to write data exchange messages.

<Node> (required)

Type: ExchangePlanRef.
A reference to the node in an exchange pattern, to which a data exchange message will be sent. The given reference cannot be empty and must correspond to an existing node, but should not be a reference to "this node".

Description:

You can Begins writing a data exchange message .
When calling the method a number is assigned to the message. That number is equal to the number of the last message sent plus1. The message header is then written in XML, and an XML element start tag corresponding to the message body is written.
Once message writing begins, a block is placed on the database associated with the node's exchange pattern , in order to prevent other message reading and writing operations relating to this node while the write function is being performed, as well as to prevent changes to node data.

Availability:

Server, thick client, external connection, Mobile application (server).

Note:

The message is not considered sent until the EndWrite() method has been called.

Example:

RecordOfMessage = ExchangePlans.CreateMessageWriter();
XMLWriter = New XMLWriter;
XMLWriter.OpenFile(FileName);
RecordOfMessage.BeginWrite(XMLWriter, Recipient);


    

1C:Enterprise Developer's Community