GetListContents Functions
The GetListContents and GetListContentsSession functions return the choices for a specific list. These two functions differ only in respect to parameters for login. For more information, see Login Parameters.
Syntax
The following is the syntax for an HTTP request:
POST /WindchillRiskandReliability12.0/DataEngine.asmx/GetListContents HTTP/1.1
Host: HostName
Content-Type: application/x-www-form-urlencoded
Content-Length: length

UserName=string&Password=string&GroupName=string&ProjectName=string
&ListCode=string&ReturnCodeAndDisplayText=string
Parameters
In addition to login parameters, both the GetListContents and GetListContentsSession functions use these parameters:
ProjectName—The name of the Windchill Risk and Reliability Project. This value is case-sensitive.
ListCode—The code for the list. This value is not case-sensitive.
ReturnCodeAndDisplayText—Indicates whether to return both the list code and display text or only the display text.
When true is entered, both the list code and display text are returned.
When false is entered, only the display text is returned.
The following is an example of an HTTP POST request:
POST /WindchillRiskandReliability12.0/DataEngine.asmx/GetListContents HTTP/1.1
Host: vm-test
Content-Type: application/x-www-form-urlencoded
Content-Length: length
UserName=Bill&Password=passwd&GroupName=Manager&ProjectName=Tablet PC
&ListCode=location&ReturnCodeAndDisplayText=true
Returns
If the user is authenticated and the specified parameter values are found, the choices for the list are returned. The following example shows both the list code and display text for each choice.
<?xml version="1.0" encoding="utf-8"?>
<DataEngineFileListResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://www.ptc.com/WindchillRiskandReliability/12.0/">
<Success>true</Success>
<AdditionalData>[{"Code":"LOCATION","NonOverrideable":false,"ListItems":[{"DisplayText":"Austin",
"Code":"AUSTIN","Value":0},{"DisplayText":"Kalamazoo","Code":"KALAMAZOO","Value":0},
{"DisplayText":"Duluth","Code":"DULUTH","Value":0},{"DisplayText":"Timbuktu",
"Code":"TI","Value":0},{"DisplayText":"Munich","Code":"MUNICH","Value":0}]}]
</AdditionalData>
</DataEngineResponse>
If the call fails, the AdditionalData tag provides the reason for the failure.