webMethods, OneData, and Terracotta  10.2 | Managing Master Data with webMethods OneData | Administering webMethods OneData | Asynchronous Messaging | Working with XML Envelopes for Self Recursive Objects? | Managing the XML Envelope for Self Recursive Hierarchy
 
Managing the XML Envelope for Self Recursive Hierarchy
Follow the procedure below, using the following code sample as an example to insert or update the XML envelope in self-recursive objects. See REST Web Services in Developing for webMethods OneData on processing mode options while generating the inbound envelope.
<?xml version="1.0"?>
<distribution>
<header>
 <onedata_version>8.2.1.0</onedata_version>
 <repository>DEV2</repository>
 <client_id>1</client_id>
 <project_id>1</project_id>
 <objectid>14464</objectid>
 <alternatekey> EMPLOYEE_SR = FNM</alternatekey>
 <decode>true</decode>
 <processingmode>delete</processingmode>
 <dateformat>YYYY-MM-DD</dateformat>
</header>
<data>
 <EMPLOYEE_SR>
 <datarow>
  <FirstName>Manager</FirstName>
  <LastName>last name</LastName>
 </datarow>
 <datarow>
  <FirstName>John</FirstName>
  <LastName>Doe</LastName>
  <RelatedManager>Manager</RelatedManager>
 </datarow>
 </EMPLOYEE_SR>
</data>
</distribution>
* To manage the XML envelope for self-recursive objects
1. Obtain the inbound envelope for the conceptual object. See Incoming Messages on the Data Acquisition Layer for more information about how to obtain the URL for retrieving the inbound XML envelope.
2. Construct the data XML for the self recursive object using the code sample provided above.
3. Specify the processing mode tag as update, delete, restore, or purge. See the section on REST Web Services in Developing for webMethods OneData for processing mode options while generating the inbound envelope.
4. If primary keys are sequences, add the alternateKey in the envelope tag as in the alternateKey code sample above.
5. Using any JMS client, send the XML file to JMS server.

Copyright © 2011-2018 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.
Innovation Release