webMethods, OneData, and Terracotta  10.2 | Managing Master Data with webMethods OneData | Administering webMethods OneData | Asynchronous Messaging | Working with Network Recursive Hierarchies | Creating the XML Envelope for Network Recursive Hierarchy
 
Creating the XML Envelope for Network Recursive Hierarchy
Follow the procedure below, using the following code sample as an example to insert or update the XML envelope in network recursive objects.
<?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>12345</objectid>
 <alternatekey>NR_EMPLOYEE = FNM; NR_EMPLOYEE_REL=EMP_ID,MGNR_ID
</alternatekey>
 <alternatekey> EMPLOYEE_SR = FNM</alternatekey>
 <decode>true</decode>
 <processingmode>delete</processingmode>
 <dateformat>YYYY-MM-DD</dateformat>
</header>
<data>
 <NR_EMPLOYEE>
  <datarow>
   <EMPNAME>Manager</EMPNAME>
  </datarow>
  <datarow>
   <EMPNAME>John Doe</EMPNAME>
    <NR_EMPLOYEE_REL>
     <datarow>
      <RelatedManager>Manager</RelatedManager>
      <RelatedEmployee> John Doe </RelatedEmployee>
     </datarow>
    </NR_EMPLOYEE_REL>
  </datarow>
 </NR_EMPLOYEE>
</data>
</distribution>
If you are using a primary key that is a sequence number, you must provide the alternateKey in the XML envelope tag. Use the following code sample when generating your own alternateKey. Example for alternate key:
<alternatekey>
NR_EMPLOYEE = FNM;
NR_EMPLOYEE_REL=EMP_ID,MGNR_ID </alternatekey>
* To create the XML envelope of a network recursive envelope
1. Obtain the inbound envelope for the network recursive 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 network 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