Example 4: Specifying Set Control Field Values to Validate Field Values Controlled by Set Control Fields
The following code example shows a request message sent to a PeopleSoft system from an integration partner as part of the PTLOOKUPPROMPT service operation to obtain a list of valid field values for the VENDOR_ID prompt field, a field controlled by a set control field.
When you provide the set control field value, PeopleSoft uses Set ID indirection (via the GetSetID built-in function ) to obtain the set ID value, and uses it to filter results during lookup.
This example shows specifying the set control field value to obtain the values for the field:
<?xml version="1.0"?>
<soapenv:Envelope xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/
"xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsa="http:
//schemas.xmlsoap.org/ws/2003/03/addressing/" xmlns:xsd="http://www.w3.org/
2001/XMLSchema/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance/">
<soapenv:Header xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<wsse:Security soap:mustUnderstand="1" xmlns:soap="http://schemas.xmlsoap.
org/wsdl/soap/" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/
oasis-200401-wss-wssecurity-secext-1.0.xsd">
<wsse:UsernameToken>
<wsse:Username>username</wsse:Username>
<wsse:Password>password</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</soapenv:Header>
<soapenv:Body xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<Lookup xmlns="http://xmlns.oracle.com/Enterprise/Tools/schemas/
PT_Lookup.Prompt_Lookup_All.V1">
<LookupRecName>VENDOR</LookupRecName>
<LookupFieldName>VENDOR_ID</LookupFieldName>
<LookupFieldValue>TPDENTIST</LookupFieldValue>
<DescrFieldName>VENDOR_NAME_SHORT</DescrFieldName>
<LanguageCode/>
<EffectiveDate/><SetControlFieldValue>US001</SetControlFieldValue>
<SetIDValue/>
<NameValPair xmlns="http://xmlns.oracle.com/Enterprise/Tools/schemas/
PT_Lookup.NameValPair.V1">
<FldName/>
<FldVal/>
</NameValPair>
</Lookup>
</soapenv:Body>
</soapenv:Envelope>The following code example shows the response message that the PeopleSoft system returns to the integration partner. The returned field values are returned in the <RespVal> and <RespDescr> elements, as highlighted in the example.
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/
"xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http:
//www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/
XMLSchema-instance">
<soapenv:Body>
<LookupResponse xmlns="http://xmlns.oracle.com/Enterprise/Tools/schemas/
PT_Lookup.LookupResponse.V1">
<ResponseComp xmlns="http://xmlns.oracle.com/Enterprise/Tools/schemas/
PT_Lookup.ResponseComp.V1">
<RespVal>TPDENTIST</RespVal>
<RespDescr>SMILEWELL-001</RespDescr>
</ResponseComp>
</LookupResponse>
</soapenv:Body>
</soapenv:Envelope>