TrackStudio 3.0 Documentation
Browser SOAP Client

This section describes how to use TrackStudio SOAP API from an Internet Browser.

To use a browser to call TrackStudio SOAP API: 

1. Enable TrackStudio SOAP API 

2. Start TrackStudio Enterprise 

3. To get the WSDL description of the service open the following URL in the browser:

http://<host>:<port>/TrackStudio/services/<service>?wsdl

For example, to get the UserService description open the following URL:

http://localhost:8888/TrackStudio/services/User?wsdl

4. To perform the authentication open the URL containing the service name, method name and parameters:

http://localhost:8888/TrackStudio/services/User?
     method=authenticate&p1=root&p2=root

This done you will get the following response:

<soapenv:Envelope>
  <soapenv:Body>
   <authenticateResponse soapenv:encodingStyle=
    "http://schemas.xmlsoap.org/soap/encoding/">
     <authenticateReturn xsi:type="xsd:string">
          SESSION:297e234cfbd88cc400fbd8b12c310011
     </authenticateReturn>
   </authenticateResponse>
  </soapenv:Body>
</soapenv:Envelope>

5. Now we can use the received session id and load the root task 

Request:

http://localhost:8888/TrackStudio/services/Find?
                          method=findTaskById&
                          p1=SESSION:297e234cfbd88cc400fbd8b12c310011&
                          p2=1

Response:

<soapenv:Envelope>
  <soapenv:Body>
    <findTaskByIdResponse soapenv:encodingStyle=
     "http://schemas.xmlsoap.org/soap/encoding/">
      <findTaskByIdReturn href="#id0"/>
    </findTaskByIdResponse>
    <multiRef id="id0" soapenc:root="0"
    soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
    xsi:type="ns1:TaskBean">
      <abudget xsi:type="xsd:double" xsi:nil="true"/>
      <budget xsi:type="xsd:double" xsi:nil="true"/>
      <categoryId xsi:type="xsd:string">1</categoryId>
      <closedate xsi:type="xsd:long">-1</closedate>
      <deadline xsi:type="xsd:long">-1</deadline>
      <description xsi:type="xsd:string" xsi:nil="true"/>
      <handlerId xsi:type="xsd:string">1</handlerId>
      <id xsi:type="xsd:string">1</id>
      <name xsi:type="xsd:string">Projects</name>
      <nameCutted xsi:type="xsd:string">ddqq11</nameCutted>
      <number xsi:type="xsd:string">1</number>
      <parentId xsi:type="xsd:string" xsi:nil="true"/>
      <priorityId xsi:type="xsd:string">2</priorityId>
      <resolutionId xsi:type="xsd:string" xsi:nil="true"/>
      <shortname xsi:type="xsd:string">ddqq11</shortname>
      <statusId xsi:type="xsd:string">2</statusId>
      <submitdate xsi:type="xsd:long">1081581068289</submitdate>
      <submitterId xsi:type="xsd:string">1</submitterId>
      <updatedate xsi:type="xsd:long">1081605601761</updatedate>
      <workflowId xsi:type="xsd:string">1</workflowId>
    </multiRef>
  </soapenv:Body>
</soapenv:Envelope>

6. In case of invalid parameters the Exception is generated: 

Request:

http://localhost:8888/TrackStudio/services/Find?
                           method=findTaskById&
                           p1=SESSION:297e234cfbd88cc400fbd8b12c310011&
                           p2=10

Response:

<soapenv:Envelope>
  <soapenv:Body>
    <soapenv:Fault>
      <faultcode>soapenv:Server.userException</faultcode>
      <faultstring>gran.exception.GranException: Task; id = 10
      </faultstring>
      <detail/>
    </soapenv:Fault>
  </soapenv:Body>
</soapenv:Envelope>
Copyright (c) 2002-2004. TrackStudio, Ltd. All rights reserved.