The eConnect schemas define eConnect XML documents as hierarchical structures of schema types and XML nodes. The hierarchy establishes parent/child relationship between each level of the document. The component layers of an eConnect XML document include the following:
The following diagram illustrates a simple eConnect XML document:
Notice how this eConnect document implements the parent/child relationships specified by the eConnect schema. The eConnect document is the parent to a single eConnect transaction type schema. The transaction type is the parent to the <eConnectProcessInfo> node and a single eConnect XML node. The XML nodes contain a set of elements which can be populated with data values. All the XML documents you use with eConnect will follow this basic pattern.
At its most basic, an eConnect XML document is a text-based data structure that contains a single <eConnectType> node. This is the document’s parent node. The child nodes of the <eConnectType> contain XML that describe individual transactions in Microsoft Dynamics GP.
A document’s <eConnectType> node defines the scope of the SQL transaction that eConnect uses when processing the document. If any child transaction of the <eConnectType> node fails, the subsequent rollback removes all transactions included with that document.
When you construct an XML document, you should include information related to a single Microsoft Dynamics GP operation. This ensures all the component pieces of the operation are consistently applied or rolled back.
If you encounter a situation that requires using unrelated transaction types within a document, evaluate whether a SQL rollback will cause problems for your application or your Microsoft Dynamics GP data. When you include multiple types inside a single document, ensure each child transaction uses the correct transaction type XML tag.
The <eConnectType> parent node can have one or more than one child nodes. The eConnect schema requires that each child node of the <eConnectType> node to be an eConnect transaction type. For example, in a document that creates a new customer, add the <RMCustomerMasterType> transaction type node to the document.
An eConnect transaction type is a XML entity that describes a Microsoft Dynamics GP document and operation. The transaction type is the parent node to one or more XML nodes.
Some transaction types contain XML nodes that may include one or more than one of a specified XML node. The schema identifies these nodes by appending “_Items" to the node name.
The eConnect schema specifies that the first XML node of each eConnect transaction type schema must be an <eConnectProcessInfo> node. You can use the elements of the <eConnectProcessInfo> node to change how specific transaction types are processed. The following example uses the <eConnectProcessInfo> node to override the default eConnect connection string:
<eConnectProcessInfo> <ConnectionString> Integrated Security=SSPI; Persist Security Info=False; Initial Catalog=TWO; Data Source=machinename </ConnectionString> </eConnectProcessInfo>
The order in which the nodes, or elements, are processed can vary depending on the API you use. To process third-party elements after the core eConnect elements, set the <eConnectProcessRunFirst> element to True. The following XML sample demonstrates how to populate this element:
<eConnectProcessInfo > <eConnectProcsRunFirst>TRUE</eConnectProcsRunFirst> </eConnectProcessInfo>
Refer to XML Schema Reference to view the transaction type schemas.
A transaction type is the parent to one or more XML nodes. An XML node is the parent to one or more XML elements. The elements contain data values. The eConnect schema defines the elements contained by each XML node.
The eConnect schema defines the following properties for each XML node: