OneData 10.7 | Managing Master Data with webMethods OneData | Administering webMethods OneData | Asynchronous Messaging | Working with the Inbound XML Envelope for Conceptual Objects | Creating the Inbound XML Envelope for Conceptual Object
 
Creating the Inbound XML Envelope for Conceptual Object
You can create the XML envelope to perform insert, update, restore, purge, or delete data action for a conceptual object.
To implement these examples, first create an inbound configuration in OneData to establish a connection to a JMS server. For more information, see Defining Messaging Objects. Use the following code sample as an example to insert or update the XML envelope in conceptual objects.
Sample XML <?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>BRAND TYPE=BRAND_TYP_NM;PRODUCT=PROD_NM</alternatekey>
 <decode>true</decode>
 <processingmode>update</processingmode>
 <dateformat>YYYY-MM-DD</dateformat>
</header>
<data>
 <PF_BRAND_TYPE>
  <datarow>
   <BRAND_TYP_NM>Mobile</BRAND_TYP_NM>
   <BRAND_TYP_CODE>MOB</BRAND_TYP_CODE>
   <BRAND_TYP_ID>101</BRAND_TYP_ID>
    <PF_BRAND>
    <datarow>
     <BRAND_ID>101</BRAND_ID>
     <BRAND_NM>Nokia</BRAND_NM>
     <BRAND_CODE>NOK</BRAND_CODE>
     <BRAND_TYP_FK>Mobile</BRAND_TYP_FK>
     <PF_PRODUCT>
    <datarow>
     <PROD_NM>N Series</PROD_NM>
     <PROD_CODE>N900</PROD_CODE>
     <PROD_ID>101</PROD_ID>
     <PROD_FK>Nokia</PROD_FK>
    </datarow>
     </PF_PRODUCT>
   </datarow>
     </PF_BRAND>
   </datarow>
  </PF_BRAND_TYPE>
</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.
<alternatekey>
BRAND TYPE=BRAND_TYP_NM;
PRODUCT=PROD_NM
</alternatekey>
*Managing the XML envelope for conceptual 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 conceptual object, using the XML code sample above. OneData automatically identifies the data for the hierarchical relationships.
3. If primary keys are sequences, add the alternateKey in the envelope tag as in the alternateKey code sample above.
Tip:
The alternateKey can be provided while generating the envelope from RESTful Web Service Link.
4. 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.
5. Using any JMS client, send the XML file to the JMS server.