This XML request is valid up to and including 3D PartStream.NET,
Version 5. For 3D PartStream.NET, Version 6, use SWGetCategoryTree4.
Description
Return the category tree in the catalog.
Input is Category Name.
Output is hierarchy of subcategories and models under the given category. If given category is empty then entire Category Tree is returned.
In case of error, error number (<faultcode>) and error description (<faultstring>) are returned.
For a list of fault codes, see XML Faults.
Interface
<interfacename> |
SWGetCategoryTree |
Name of interface |
<sessionid> |
Id |
Id of the active session. |
Parameters
<secure> |
Secure |
Security flag. |
<category> |
CategoryName |
Category Name. If this tag is omitted, the entire tree is returned. |
<level> |
Level Index |
Level of descendants to return starting from the category requested. If omitted, the entire tree from the requested category will be returned. |
Return Values
<success> |
Description |
Success description |
<returnval> |
ReturnVal |
Return Value. The hierarchy of subcategories and models under the given category. |
<datafile> |
DataFile |
Data file |
<category> |
Category |
The subcategories. Parent element of <name> and <item>. |
<name> |
Name |
Name of subcategory |
<item> |
Item |
Item under subcategory |
Fault Values
<faultcode> |
ErrorNumber |
Error code |
<faultstring>
|
Description |
Description of the error |
Remarks
If level = 1, the immediate child categories and models
are returned.
If level = 2, the child categories and models and their child categories
and models are returned.
If level = n, the child categories and models up the level n are returned.
Sample SOAP/XML Request
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Header>
<interfacename>SWGetCategoryTree</interfacename>
<sessionid>0000</sessionid>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<interfaceparameters>
<secure>off</secure>
<category>Parts</category>
<level>1</level>
</interfaceparameters>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Sample SOAP/XML Success Response
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Header>
<interfacename>SWGetCategoryTree</interfacename>
<sessionid>0000</sessionid>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<success>Success Description</success>
<returnval>
<category>
<name> Parts </name>
<category>
<name> SimpleParts</name>
<item>Part1</item>
<item>Part2</item>
</category>
<category>
<name> ComplexParts</name>
<item>ComplexPart</item>
</category>
.. as many as appropriate
</category>
</returnval>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Sample SOAP/XML Error Response
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Header>
<interfacename>SWGetCategoryTree</interfacename>
<sessionid>0000</sessionid>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<faultcode>0000</faultcode>
<faultstring>Description</faultstring>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>