Get XMLBridge Next Generation at SourceForge.net. Fast, secure and Free Open Source software downloads


This step by step example demonstrates how to export TeamTrack items as an XML file using XBridgeNG. First verify that you have an up to date copy of XBridgeNG and that your [[Installation|installation]] is complete. Also it is a prerequisite to have Serena TeamTrack and the TeamTrack Webservices (ttwebservices) correctly installed. The TeamTrack Administrator Guide which is included in TeamTrack will have more details about this.

1. Open a command shell. On Microsoft Windows Systems you can do this by starting cmd.exe (Start --> Run --> "cmd" --> OK). The change into the XBridgeNG basedir.

2. Edit the configuration file for the TeamTrack Webservices Task. The file ("teamtrack.properties") is located in the XBridgeNG basedir under the "confdir" directory.

It may look like this (without line numbers):

<bash>
# Sample TeamTrack properties file
# for TeamTrack Sample DB

# Connection details
user=bill
password=
port=80
host=localhost
wsdl=http://${tt.host}:${tt.port}/gsoap/ttwebservices.wsdl
service=http://${tt.host}:${tt.port}/gsoap/gsoap_ssl.dll?ttwebservices

# Advanced configuration
itemquery=1000,TS_ID > 0
linklevel=1
linkmode=TITLE-ONLY
encoding=ISO-8859-1
httpauthuser=Administrator
httpauthpass=

# Other
submitproject=Animation Pro
</bash>

The properties "user" and "password" refer to a teamtrack user. "Bill" is the standard admin user for the TeamTrack Sample Database. The user needs full access to any projects/ tables you want to export from.
Port and host refer to the TeamTrack Webserver. Usually you do not need to change the urls given for "wsdl" and "service".

"itemquery" does define which items to export. The syntax is "tableId, whereclause". The value "1000,TS_ID > 0" does mean to export all items from table 1000. Verify that the encoding is correct. You probably need to change this to "utf-8".

3. Start the export.
<bash>bin\ant.bat -Dtt.outfile=myexport.xml -f examples\TTWsExample.xml ttout</bash>

The output is written to "myexport.xml".
The example file "TTWsExample.xml" does contain a target names "ttout":

<xml>
<!--
Target that exports the TeamTrack items
specified in the 'itemquery' parameter
to the file given it 'dstfile' property
as an ItemDataList
-->
<target name="ttout">
<teamtrack ttuser="${tt.user}"
ttpassword="${tt.password}"
servicelocation="${tt.service}"
wsdllocation="${tt.wsdl}"
name="TeamTrack1"
dstfile="${tt.outfile}"
relations="${tt.linkmode}"
linklevel="${tt.linklevel}"
itemquery="${tt.itemquery}"/>
<if>
<equals arg1="${has_error}" arg2="true"/>
<then>
<echo message="${error_messages}"/>
<fail status="1"/>
</then>
</if>
</target>
</xml>