Capture TRD Example
Importing a TRD.
URL
{tix-instance}/gci/importTRD
Request example
POST /tix/gci/importTRD HTTP/1.1
Host: myhost:8443
User-Agent: Jakarta Commons-HttpClient/2.0final
Content-Type: text/xml; charset=ISO-8859-1
Content-Length: 2562
Authorization: Basic XXXXXXXXXXXXXXXXXX
<?xml version="1.0" encoding="UTF-8"?>
<TRDef id="MyTRD" xmlns="http://www.tracetracker.com/trd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.tracetracker.com/trd
http://schema.tracetracker.com/ttTRD_3_4.xsd">
<PropertyTypes>
<PropertyType format="CHAR64" id="name">
<Label>
<Text xml:lang="en">Name</Text>
</Label>
</PropertyType>
</PropertyTypes>
<BatchTypes>
<BatchType id="Production" batch-class="basic" visible="true">
<Label>
<Text xml:lang="en">Production</Text>
</Label>
<PropertyRef id="name" occurrence="required"/>
</BatchType>
</BatchTypes>
<TradeUnitTypes>
<TradeUnitType id="Product" tradeunit-class="basic">
<Label>
<Text xml:lang="en">Raw material</Text>
</Label>
<PropertyRef id="name" occurrence="required"/>
</TradeUnitType>
</TradeUnitTypes>
</TRDef>
Response example
HTTP/1.1 200 OK
Content-Length: 1388
X-Powered-By: Servlet 2.4; JBoss-4.0.3SP1 (build: CVSTag=JBoss_4_0_3_SP1
date=200510231054)/Tomcat-5.5
Date: Thu, 16 Feb 2006 14:39:01 GMT
Content-Type: text/xml;charset=ISO-8859-1
Server: Apache-Coyote/1.1
<?xml version="1.0" encoding="UTF-8" ?>
<service-invocation method-name="importTRD"
xmlns="http://www.tracetracker.com/serviceInvocation"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.tracetracker.com/serviceInvocation
http://schema.tracetracker.com/gtnet-capture-interface_4_3.xsd">
<request url="https://hostname:8443/tix/gci/importTRD" method="POST">
<headers>
<header name="content-type" value="text/xml" />
<header name="authorization" value="Basic ***********" />
<header name="user-agent" value="Jakarta Commons-HttpClient/2.0.2" />
<header name="host" value="myhost:8443" />
<header name="content-length" value="2778" />
</headers>
<remote-host>192.168.12.255</remote-host>
<remote-user>user</remote-user>
</request>
<response success="true">
<import-result>
<data-type name="trd.proptype" created="1" duplicates="0" ignored="0" total="74" />
<data-type name="trd.batchtype" created="1" duplicates="0" ignored="0" total="18" />
<data-type name="trd.tutype" created="1" duplicates="0" ignored="0" total="8" />
</import-result>
</response>
</service-invocation>