The following topic describes how to use TrackStudio SOAP API from an Web browser.
To use a browser to call TrackStudio SOAP API:
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
http://localhost:8888/TrackStudio/services/User?
method=authenticate&p1=root&p2=rootWhen you do this, you will get the following response:
<soapenv:Envelope>
<soapenv:Body>
<authenticateResponse
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<authenticateReturn xsi:type="soapenc:string">
4458443e969146a510b799a6164c68bd
</authenticateReturn>
</authenticateResponse>
</soapenv:Body>
</soapenv:Envelope>http://localhost:8888/TrackStudio/services/Find?
method=findTaskById&
p1=4458443e969146a510b799a6164c68bd&
p2=1<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">
<priorityId xsi:type="soapenc:string">2</priorityId>
<workflowId xsi:type="soapenc:string">1</workflowId>
<budget xsi:type="soapenc:double" xsi:nil="true"/>
<submitdate href="#id1"/>
<handlerId xsi:type="soapenc:string">1</handlerId>
<abudget href="#id2"/>
<childrenCount href="#id3"/>
<id xsi:type="soapenc:string">1</id>
<messageCount href="#id4"/>
<closedate href="#id5"/>
<name xsi:type="soapenc:string">Projects</name>
<number xsi:type="soapenc:string">1</number>
<submitterId xsi:type="soapenc:string">1</submitterId>
<parentId xsi:type="soapenc:string" xsi:nil="true"/>
<resolutionId xsi:type="soapenc:string" xsi:nil="true"/>
<statusId xsi:type="soapenc:string">2</statusId>
<deadline href="#id6"/>
<updatedate href="#id7"/>
<hasAttachments href="#id8"/>
<description xsi:type="soapenc:string"/>
<shortname xsi:type="soapenc:string" xsi:nil="true"/>
<nameCutted xsi:type="soapenc:string">Projects</nameCutted>
<categoryId xsi:type="soapenc:string">1</categoryId>
<onSight href="#id9"/>
</multiRef>
<multiRef id="id2" soapenc:root="0"
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="soapenc:double">0.0
</multiRef>
<multiRef id="id9" soapenc:root="0"
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="xsd:boolean">true
</multiRef>
<multiRef id="id8" soapenc:root="0"
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="xsd:boolean">false
</multiRef>
<multiRef id="id3" soapenc:root="0"
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="xsd:int">1
</multiRef>
<multiRef id="id5" soapenc:root="0"
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="xsd:long">-1
</multiRef>
<multiRef id="id7" soapenc:root="0"
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="xsd:long">1099161350000
</multiRef>
<multiRef id="id6" soapenc:root="0"
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="xsd:long">-1
</multiRef>
<multiRef id="id4" soapenc:root="0"
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="xsd:int">0
</multiRef>
<multiRef id="id1" soapenc:root="0"
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="xsd:long">1084368653000
</multiRef>
</soapenv:Body>
</soapenv:Envelope>http://localhost:8888/TrackStudio/services/Find?
method=findTaskById&
p1=4458443e969146a510b799a6164c68bd&
p2=10<soapenv:Envelope>
<soapenv:Body>
<soapenv:Fault>
<faultcode>soapenv:Server.userException</faultcode>
<faultstring>
gran.exception.TaskNotFoundException: Specified task not found.
</faultstring>
<detail>
<ns1:stackTrace>
gran.exception.TaskNotFoundException: Specified task not found.
at com.trackstudio.tools.HibernateUtil.getObject(HibernateUtil.java:404)
</ns1:stackTrace>
<ns2:hostname>trackstu-server</ns2:hostname>
</detail>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>|
Copyright (c) 2002-2006. All rights reserved.
|
|
What do you think about this topic? Send feedback!
|