Creating Custom Attributes

Procedure

  1. Create a new request based on the requestAttributes operation. This requires the component primary key for the new component created in the previous topic.
    Note: Note that:
    • Attribute names need to be unique. Check against the existing attribute list to ensure that your attribute does not conflict with an existing attribute (see Attributes to obtain the existing attribute list).
  2. The following example creates the two attributes customAttr1 of type STRING and customAttr2 of type LONG:
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:api="http://api.ec.n2.tibco.com" xmlns:base="http://base.api.ec.n2.tibco.com">
       <soapenv:Header/>
       <soapenv:Body>
          <api:registerAttributesRequest>
             <componentId>20</componentId>
             <!--1 or more repetitions:-->
             <base:AttributeDefinition>
                <category>CUSTOM</category>
                <name > customAttr1</name >             <type > STRING</type
             </base:AttributeDefinition>
             <base:AttributeDefinition>
                <category>CUSTOM</category>
                <name > customAttr2</name >             <type > LONG</type
             </base:AttributeDefinition>
          </api:registerAttributesRequest>
       </soapenv:Body>
    </soapenv:Envelope>
  3. The response will contain the unique attribute primary keys for the new attributes (see highlighted text in the figure above).