Example 2: Performing a Prompt Table Lookup with a Field Value Wildcard
The following code example shows a request message sent to a PeopleSoft system as part of the PTLOOKUPPROMPT service operation to perform a prompt table lookup on the Country table using a wildcard (%) on the field value to find country names that begin with the letter U:
<?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.V1">
<LookupRecName>COUNTRY_TBL</LookupRecName>
<LookupFieldName>COUNTRY</LookupFieldName>
<LookupFieldValue>U%</LookupFieldValue>
<DescrFieldName>DESCR</DescrFieldName>
<LanguageCode></LanguageCode>
<EffectiveDate></EffectiveDate>
</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>UMI</RespVal>
<RespDescr>US Minor Outlying Islands</RespDescr>
</ResponseComp>
<ResponseComp xmlns="http://xmlns.oracle.com/Enterprise/Tools/schemas/
PT_Lookup.ResponseComp.V1"><RespVal>UGA</RespVal>
<RespDescr>Uganda</RespDescr>
</ResponseComp>
<ResponseComp xmlns="http://xmlns.oracle.com/Enterprise/Tools/schemas/
PT_Lookup.ResponseComp.V1"><RespVal>UKR</RespVal>
<RespDescr>Ukraine</RespDescr>
</ResponseComp>
<ResponseComp xmlns="http://xmlns.oracle.com/Enterprise/Tools/schemas/
PT_Lookup.ResponseComp.V1"><RespVal>USA</RespVal>
<RespDescr>United States</RespDescr>
</ResponseComp>
<ResponseComp xmlns="http://xmlns.oracle.com/Enterprise/Tools/schemas/
PT_Lookup.ResponseComp.V1"><RespVal>URY</RespVal>
<RespDescr>Uruguay</RespDescr>
</ResponseComp>
<ResponseComp xmlns="http://xmlns.oracle.com/Enterprise/Tools/schemas/
PT_Lookup.ResponseComp.V1"><RespVal>UZB</RespVal>
<RespDescr>Uzbekistan</RespDescr>
</ResponseComp>
</LookupResponse>
</soapenv:Body>
</soapenv:Envelope>