Working with SOAP Input Payload in Oracle Cloud Fusion HCM
In this article we will focus on understanding how to use conditions in request payload of SOAP Web Service. In this example, we will use Worker service and operation findWorker to understand the concepts.
Case 1: How to check existence of any field value
Request:
<typ:findWorker>
<typ:findCriteria>
<typ1:fetchStart>0</typ1:fetchStart>
<typ1:fetchSize>-1</typ1:fetchSize>
<typ1:filter>
<typ1:group>
<typ1:conjunction>And</typ1:conjunction>
<typ1:upperCaseCompare>true</typ1:upperCaseCompare>
<typ1:item>
<typ1:conjunction>And</typ1:conjunction>
<typ1:upperCaseCompare>false</typ1:upperCaseCompare>
<typ1:attribute>WorkerNationalIdentifier</typ1:attribute>
<typ1:operator>EXISTS</typ1:operator>
<typ1:nested>
<typ1:group>
<typ1:item>
<typ1:upperCaseCompare>false</typ1:upperCaseCompare>
<typ1:attribute>NationalIdentifierNumber</typ1:attribute>
<typ1:operator>=</typ1:operator>
<typ1:value>123123123</typ1:value>
</typ1:item>
</typ1:group>
</typ1:nested>
</typ1:item>
</typ1:group>
</typ1:filter>
</typ:findCriteria>
</typ:findWorker>
Case 2: How to get selected fields in the response
Example - To get WorkerName tag and selected fields under this tag.
Request:
<soapenv:Body>
<typ:findWorker>
<typ:findCriteria>
<typ1:fetchStart>0</typ1:fetchStart>
<typ1:fetchSize>1</typ1:fetchSize>
<typ1:filter>
<typ1:conjunction>And</typ1:conjunction>
<typ1:group>
<typ1:conjunction>And</typ1:conjunction>
<typ1:upperCaseCompare>false</typ1:upperCaseCompare>
<typ1:item>
<typ1:conjunction>And</typ1:conjunction>
<typ1:upperCaseCompare>false</typ1:upperCaseCompare>
<typ1:attribute>PersonNumber</typ1:attribute>
<typ1:operator>=</typ1:operator>
<typ1:value>1234</typ1:value>
</typ1:item>
</typ1:group>
</typ1:filter>
<typ1:findAttribute>WorkerName</typ1:findAttribute>
<typ1:excludeAttribute>false</typ1:excludeAttribute>
<typ1:childFindCriteria>
<typ1:fetchStart>0</typ1:fetchStart>
<typ1:fetchSize>10</typ1:fetchSize>
<typ1:findAttribute>FirstName</typ1:findAttribute>
<typ1:findAttribute>LastName</typ1:findAttribute>
<typ1:findAttribute>NameType</typ1:findAttribute>
<typ1:excludeAttribute>false</typ1:excludeAttribute>
<typ1:childFindCriteria/>
<typ1:childAttrName>WorkerName</typ1:childAttrName>
</typ1:childFindCriteria>
</typ:findCriteria>
<typ:findControl>
<typ1:retrieveAllTranslations>false</typ1:retrieveAllTranslations>
</typ:findControl>
</typ:findWorker>
</soapenv:Body>
Response:
<env:Body>
<ns0:findWorkerResponse xmlns:ns0="http://xmlns.oracle.com/apps/hcm/employment/core/workerServiceV2/types/">
<ns2:result xsi:type="ns1:WorkerResult" xmlns:ns2="http://xmlns.oracle.com/apps/hcm/employment/core/workerServiceV2/types/" xmlns:ns1="http://xmlns.oracle.com/apps/hcm/employment/core/workerServiceV2/" xmlns:tns="http://xmlns.oracle.com/adf/svc/errors/" xmlns:ns0="http://xmlns.oracle.com/adf/svc/types/" xmlns:ns35="http://xmlns.oracle.com/apps/hcm/people/core/flex/personEITEFF/base/" xmlns:ns32="http://xmlns.oracle.com/apps/hcm/people/core/flex/personDFF/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ns1:Value>
<ns1:WorkerName>
<ns1:NameType>GLOBAL</ns1:NameType>
<ns1:FirstName>James</ns1:FirstName>
<ns1:LastName>Frost</ns1:LastName>
</ns1:WorkerName>
<ns1:WorkerName>
<ns1:NameType>US</ns1:NameType>
<ns1:FirstName>James</ns1:FirstName>
<ns1:LastName>Frost</ns1:LastName>
</ns1:WorkerName>
</ns1:Value>
</ns2:result>
</ns0:findWorkerResponse>
</env:Body>
Case 3: How to use condition on child dataset
Example - To filter the response to return only one record with condition NameType = 'GLOBAL'
Request:
<soapenv:Body>
<typ:findWorker>
<typ:findCriteria>
<typ1:fetchStart>0</typ1:fetchStart>
<typ1:fetchSize>1</typ1:fetchSize>
<typ1:filter>
<typ1:conjunction>And</typ1:conjunction>
<typ1:group>
<typ1:conjunction>And</typ1:conjunction>
<typ1:upperCaseCompare>false</typ1:upperCaseCompare>
<typ1:item>
<typ1:conjunction>And</typ1:conjunction>
<typ1:upperCaseCompare>false</typ1:upperCaseCompare>
<typ1:attribute>PersonNumber</typ1:attribute>
<typ1:operator>=</typ1:operator>
<typ1:value>1234</typ1:value>
</typ1:item>
</typ1:group>
</typ1:filter>
<typ1:findAttribute>WorkerName</typ1:findAttribute>
<typ1:excludeAttribute>false</typ1:excludeAttribute>
<typ1:childFindCriteria>
<typ1:fetchStart>0</typ1:fetchStart>
<typ1:fetchSize>-1</typ1:fetchSize>
<!--Optional:-->
<typ1:filter>
<!--Optional:-->
<typ1:conjunction>And</typ1:conjunction>
<!--1 or more repetitions:-->
<typ1:group>
<!--Optional:-->
<typ1:conjunction>And</typ1:conjunction>
<typ1:upperCaseCompare>false</typ1:upperCaseCompare>
<!--1 or more repetitions:-->
<typ1:item>
<!--Optional:-->
<typ1:conjunction>And</typ1:conjunction>
<typ1:upperCaseCompare>false</typ1:upperCaseCompare>
<typ1:attribute>NameType</typ1:attribute>
<typ1:operator>=</typ1:operator>
<!--You have a CHOICE of the next 2 items at this level-->
<!--Zero or more repetitions:-->
<typ1:value>GLOBAL</typ1:value>
<!--<typ1:nested/>-->
</typ1:item>
</typ1:group>
<!--Zero or more repetitions:-->
<!--<typ1:nested/>-->
</typ1:filter>
<!--Optional:-->
<!--Zero or more repetitions:-->
<typ1:findAttribute>FirstName</typ1:findAttribute>
<typ1:findAttribute>LastName</typ1:findAttribute>
<typ1:findAttribute>NameType</typ1:findAttribute>
<typ1:excludeAttribute>false</typ1:excludeAttribute>
<!--Zero or more repetitions:-->
<typ1:childFindCriteria/>
<typ1:childAttrName>WorkerName</typ1:childAttrName>
</typ1:childFindCriteria>
</typ:findCriteria>
<typ:findControl>
<typ1:retrieveAllTranslations>false</typ1:retrieveAllTranslations>
</typ:findControl>
</typ:findWorker>
</soapenv:Body>
Case 1: How to check existence of any field value
Request:
<typ:findWorker>
<typ:findCriteria>
<typ1:fetchStart>0</typ1:fetchStart>
<typ1:fetchSize>-1</typ1:fetchSize>
<typ1:filter>
<typ1:group>
<typ1:conjunction>And</typ1:conjunction>
<typ1:upperCaseCompare>true</typ1:upperCaseCompare>
<typ1:item>
<typ1:conjunction>And</typ1:conjunction>
<typ1:upperCaseCompare>false</typ1:upperCaseCompare>
<typ1:attribute>WorkerNationalIdentifier</typ1:attribute>
<typ1:operator>EXISTS</typ1:operator>
<typ1:nested>
<typ1:group>
<typ1:item>
<typ1:upperCaseCompare>false</typ1:upperCaseCompare>
<typ1:attribute>NationalIdentifierNumber</typ1:attribute>
<typ1:operator>=</typ1:operator>
<typ1:value>123123123</typ1:value>
</typ1:item>
</typ1:group>
</typ1:nested>
</typ1:item>
</typ1:group>
</typ1:filter>
</typ:findCriteria>
</typ:findWorker>
Case 2: How to get selected fields in the response
Example - To get WorkerName tag and selected fields under this tag.
Request:
<soapenv:Body>
<typ:findWorker>
<typ:findCriteria>
<typ1:fetchStart>0</typ1:fetchStart>
<typ1:fetchSize>1</typ1:fetchSize>
<typ1:filter>
<typ1:conjunction>And</typ1:conjunction>
<typ1:group>
<typ1:conjunction>And</typ1:conjunction>
<typ1:upperCaseCompare>false</typ1:upperCaseCompare>
<typ1:item>
<typ1:conjunction>And</typ1:conjunction>
<typ1:upperCaseCompare>false</typ1:upperCaseCompare>
<typ1:attribute>PersonNumber</typ1:attribute>
<typ1:operator>=</typ1:operator>
<typ1:value>1234</typ1:value>
</typ1:item>
</typ1:group>
</typ1:filter>
<typ1:findAttribute>WorkerName</typ1:findAttribute>
<typ1:excludeAttribute>false</typ1:excludeAttribute>
<typ1:childFindCriteria>
<typ1:fetchStart>0</typ1:fetchStart>
<typ1:fetchSize>10</typ1:fetchSize>
<typ1:findAttribute>FirstName</typ1:findAttribute>
<typ1:findAttribute>LastName</typ1:findAttribute>
<typ1:findAttribute>NameType</typ1:findAttribute>
<typ1:excludeAttribute>false</typ1:excludeAttribute>
<typ1:childFindCriteria/>
<typ1:childAttrName>WorkerName</typ1:childAttrName>
</typ1:childFindCriteria>
</typ:findCriteria>
<typ:findControl>
<typ1:retrieveAllTranslations>false</typ1:retrieveAllTranslations>
</typ:findControl>
</typ:findWorker>
</soapenv:Body>
Response:
<env:Body>
<ns0:findWorkerResponse xmlns:ns0="http://xmlns.oracle.com/apps/hcm/employment/core/workerServiceV2/types/">
<ns2:result xsi:type="ns1:WorkerResult" xmlns:ns2="http://xmlns.oracle.com/apps/hcm/employment/core/workerServiceV2/types/" xmlns:ns1="http://xmlns.oracle.com/apps/hcm/employment/core/workerServiceV2/" xmlns:tns="http://xmlns.oracle.com/adf/svc/errors/" xmlns:ns0="http://xmlns.oracle.com/adf/svc/types/" xmlns:ns35="http://xmlns.oracle.com/apps/hcm/people/core/flex/personEITEFF/base/" xmlns:ns32="http://xmlns.oracle.com/apps/hcm/people/core/flex/personDFF/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ns1:Value>
<ns1:WorkerName>
<ns1:NameType>GLOBAL</ns1:NameType>
<ns1:FirstName>James</ns1:FirstName>
<ns1:LastName>Frost</ns1:LastName>
</ns1:WorkerName>
<ns1:WorkerName>
<ns1:NameType>US</ns1:NameType>
<ns1:FirstName>James</ns1:FirstName>
<ns1:LastName>Frost</ns1:LastName>
</ns1:WorkerName>
</ns1:Value>
</ns2:result>
</ns0:findWorkerResponse>
</env:Body>
Case 3: How to use condition on child dataset
Example - To filter the response to return only one record with condition NameType = 'GLOBAL'
Request:
<soapenv:Body>
<typ:findWorker>
<typ:findCriteria>
<typ1:fetchStart>0</typ1:fetchStart>
<typ1:fetchSize>1</typ1:fetchSize>
<typ1:filter>
<typ1:conjunction>And</typ1:conjunction>
<typ1:group>
<typ1:conjunction>And</typ1:conjunction>
<typ1:upperCaseCompare>false</typ1:upperCaseCompare>
<typ1:item>
<typ1:conjunction>And</typ1:conjunction>
<typ1:upperCaseCompare>false</typ1:upperCaseCompare>
<typ1:attribute>PersonNumber</typ1:attribute>
<typ1:operator>=</typ1:operator>
<typ1:value>1234</typ1:value>
</typ1:item>
</typ1:group>
</typ1:filter>
<typ1:findAttribute>WorkerName</typ1:findAttribute>
<typ1:excludeAttribute>false</typ1:excludeAttribute>
<typ1:childFindCriteria>
<typ1:fetchStart>0</typ1:fetchStart>
<typ1:fetchSize>-1</typ1:fetchSize>
<!--Optional:-->
<typ1:filter>
<!--Optional:-->
<typ1:conjunction>And</typ1:conjunction>
<!--1 or more repetitions:-->
<typ1:group>
<!--Optional:-->
<typ1:conjunction>And</typ1:conjunction>
<typ1:upperCaseCompare>false</typ1:upperCaseCompare>
<!--1 or more repetitions:-->
<typ1:item>
<!--Optional:-->
<typ1:conjunction>And</typ1:conjunction>
<typ1:upperCaseCompare>false</typ1:upperCaseCompare>
<typ1:attribute>NameType</typ1:attribute>
<typ1:operator>=</typ1:operator>
<!--You have a CHOICE of the next 2 items at this level-->
<!--Zero or more repetitions:-->
<typ1:value>GLOBAL</typ1:value>
<!--<typ1:nested/>-->
</typ1:item>
</typ1:group>
<!--Zero or more repetitions:-->
<!--<typ1:nested/>-->
</typ1:filter>
<!--Optional:-->
<!--Zero or more repetitions:-->
<typ1:findAttribute>FirstName</typ1:findAttribute>
<typ1:findAttribute>LastName</typ1:findAttribute>
<typ1:findAttribute>NameType</typ1:findAttribute>
<typ1:excludeAttribute>false</typ1:excludeAttribute>
<!--Zero or more repetitions:-->
<typ1:childFindCriteria/>
<typ1:childAttrName>WorkerName</typ1:childAttrName>
</typ1:childFindCriteria>
</typ:findCriteria>
<typ:findControl>
<typ1:retrieveAllTranslations>false</typ1:retrieveAllTranslations>
</typ:findControl>
</typ:findWorker>
</soapenv:Body>
Response:
<env:Body>
<ns0:findWorkerResponse xmlns:ns0="http://xmlns.oracle.com/apps/hcm/employment/core/workerServiceV2/types/">
<ns2:result xsi:type="ns1:WorkerResult" xmlns:ns2="http://xmlns.oracle.com/apps/hcm/employment/core/workerServiceV2/types/" xmlns:ns1="http://xmlns.oracle.com/apps/hcm/employment/core/workerServiceV2/" xmlns:tns="http://xmlns.oracle.com/adf/svc/errors/" xmlns:ns0="http://xmlns.oracle.com/adf/svc/types/" xmlns:ns35="http://xmlns.oracle.com/apps/hcm/people/core/flex/personEITEFF/base/" xmlns:ns32="http://xmlns.oracle.com/apps/hcm/people/core/flex/personDFF/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ns1:Value>
<ns1:WorkerName>
<ns1:NameType>GLOBAL</ns1:NameType>
<ns1:FirstName>James</ns1:FirstName>
<ns1:LastName>Frost</ns1:LastName>
</ns1:WorkerName>
</ns1:Value>
</ns2:result>
</ns0:findWorkerResponse>
</env:Body>
Case 4 : How to use nested condition at parent level and how to use nested condition at child and grand child level
Using this we can get one record, provided we have one condition at relationship level and one at work terms level. I have included parent level condition just to show how to use condition at grand child level, however it does not restrict the response even if we apply condition at grand child level. In this example, I have one worker, two relationship with different Period Of Service Id, first relationship has WorkTerms with Assignment Number as ET00012345 and second relationship has WorkTerms with Assignment Number as ET00012345-2. Both the assignments are active but we intend to get result for second assignment.
<soapenv:Body>
<typ:findWorker>
<typ:findCriteria>
<typ1:fetchStart>0</typ1:fetchStart>
<typ1:fetchSize>1</typ1:fetchSize>
<typ1:filter>
<typ1:group>
<typ1:conjunction>And</typ1:conjunction>
<typ1:upperCaseCompare>false</typ1:upperCaseCompare>
<typ1:item>
<typ1:conjunction>And</typ1:conjunction>
<typ1:upperCaseCompare>false</typ1:upperCaseCompare>
<typ1:attribute>WorkRelationship</typ1:attribute>
<typ1:operator>EXISTS</typ1:operator>
<typ1:nested>
<typ1:group>
<typ1:conjunction>And</typ1:conjunction>
<typ1:upperCaseCompare>false</typ1:upperCaseCompare>
<typ1:item>
<typ1:conjunction>And</typ1:conjunction>
<typ1:upperCaseCompare>false</typ1:upperCaseCompare>
<typ1:attribute>WorkTerms</typ1:attribute>
<typ1:operator>EXISTS</typ1:operator>
<typ1:nested>
<typ1:group>
<typ1:item>
<typ1:upperCaseCompare>false</typ1:upperCaseCompare>
<typ1:attribute>AssignmentNumber</typ1:attribute>
<typ1:operator>=</typ1:operator>
<typ1:value>ET00012345-2</typ1:value>
</typ1:item>
</typ1:group>
</typ1:nested>
</typ1:item>
</typ1:group>
</typ1:nested>
</typ1:item>
</typ1:group>
</typ1:filter>
<typ1:findAttribute>WorkRelationship</typ1:findAttribute>
<typ1:excludeAttribute>false</typ1:excludeAttribute>
<typ1:childFindCriteria>
<typ1:fetchStart>0</typ1:fetchStart>
<typ1:fetchSize>10</typ1:fetchSize>
<typ1:filter>
<!--Optional:-->
<typ1:conjunction>And</typ1:conjunction>
<!--1 or more repetitions:-->
<typ1:group>
<!--Optional:-->
<typ1:conjunction>And</typ1:conjunction>
<typ1:upperCaseCompare>false</typ1:upperCaseCompare>
<!--1 or more repetitions:-->
<typ1:item>
<!--Optional:-->
<typ1:conjunction>And</typ1:conjunction>
<typ1:upperCaseCompare>false</typ1:upperCaseCompare>
<typ1:attribute>PeriodOfServiceId</typ1:attribute>
<typ1:operator>=</typ1:operator>
<!--You have a CHOICE of the next 2 items at this level-->
<!--Zero or more repetitions:-->
<typ1:value>300000028600990</typ1:value>
<!--<typ1:nested/>-->
</typ1:item>
</typ1:group>
<!--Zero or more repetitions:-->
<!--<typ1:nested/>-->
</typ1:filter>
<typ1:findAttribute>PeriodOfServiceId</typ1:findAttribute>
<typ1:findAttribute>WorkTerms</typ1:findAttribute>
<typ1:excludeAttribute>false</typ1:excludeAttribute>
<typ1:childFindCriteria>
<typ1:fetchStart>0</typ1:fetchStart>
<typ1:fetchSize>10</typ1:fetchSize>
<typ1:filter>
<!--Optional:-->
<typ1:conjunction>And</typ1:conjunction>
<!--1 or more repetitions:-->
<typ1:group>
<!--Optional:-->
<typ1:conjunction>And</typ1:conjunction>
<typ1:upperCaseCompare>false</typ1:upperCaseCompare>
<!--1 or more repetitions:-->
<typ1:item>
<!--Optional:-->
<typ1:conjunction>And</typ1:conjunction>
<typ1:upperCaseCompare>false</typ1:upperCaseCompare>
<typ1:attribute>AssignmentNumber</typ1:attribute>
<typ1:operator>=</typ1:operator>
<!--You have a CHOICE of the next 2 items at this level-->
<!--Zero or more repetitions:-->
<typ1:value>ET00012345-2</typ1:value>
<!--<typ1:nested/>-->
</typ1:item>
</typ1:group>
<!--Zero or more repetitions:-->
<!--<typ1:nested/>-->
</typ1:filter>
<typ1:findAttribute>AssignmentNumber</typ1:findAttribute>
<typ1:findAttribute>AssignmentStatusTypeCode</typ1:findAttribute>
<typ1:excludeAttribute>false</typ1:excludeAttribute>
<typ1:childFindCriteria/>
<typ1:childAttrName>WorkTerms</typ1:childAttrName>
</typ1:childFindCriteria>
<typ1:excludeAttribute>false</typ1:excludeAttribute>
<typ1:childFindCriteria/>
<typ1:childAttrName>WorkRelationship</typ1:childAttrName>
</typ1:childFindCriteria>
</typ:findCriteria>
<typ:findControl>
<typ1:retrieveAllTranslations>false</typ1:retrieveAllTranslations>
</typ:findControl>
</typ:findWorker>
</soapenv:Body>
Response:
<env:Body>
<ns0:findWorkerResponse xmlns:ns0="http://xmlns.oracle.com/apps/hcm/employment/core/workerServiceV2/types/">
<ns2:result xsi:type="ns1:WorkerResult" xmlns:ns2="http://xmlns.oracle.com/apps/hcm/employment/core/workerServiceV2/types/" xmlns:ns1="http://xmlns.oracle.com/apps/hcm/employment/core/workerServiceV2/" xmlns:tns="http://xmlns.oracle.com/adf/svc/errors/" xmlns:ns0="http://xmlns.oracle.com/adf/svc/types/" xmlns:ns35="http://xmlns.oracle.com/apps/hcm/people/core/flex/personEITEFF/base/" xmlns:ns32="http://xmlns.oracle.com/apps/hcm/people/core/flex/personDFF/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ns1:Value>
<ns1:WorkRelationship xmlns:ns17="http://xmlns.oracle.com/apps/hcm/employment/core/flex/periodOfServiceDFF/" xmlns:ns18="http://xmlns.oracle.com/apps/hcm/employment/core/flex/periodOfServiceDDF/">
<ns1:PeriodOfServiceId>300000028600990</ns1:PeriodOfServiceId>
<ns1:WorkTerms xmlns:ns14="http://xmlns.oracle.com/apps/hcm/employment/core/flex/assignmentExtraInfoEFF/Category/" xmlns:ns12="http://xmlns.oracle.com/apps/hcm/employment/core/publicFlex/peopleGroupKFF/" xmlns:ns13="http://xmlns.oracle.com/apps/financials/generalLedger/accounts/codeCombinations/publicFlex/Account/" xmlns:ns10="http://xmlns.oracle.com/apps/hcm/employment/core/flex/baseWorkerAssignmentDDF/" xmlns:ns11="http://xmlns.oracle.com/apps/hcm/employment/core/flex/baseWorkerAssignmentDFF/">
<ns1:AssignmentNumber>ET00012345-2</ns1:AssignmentNumber>
<ns1:AssignmentStatusTypeCode>ACTIVE</ns1:AssignmentStatusTypeCode>
</ns1:WorkTerms>
</ns1:WorkRelationship>
</ns1:Value>
</ns2:result>
</ns0:findWorkerResponse>
</env:Body>
Jackpot City Hotel & Casino
ReplyDeleteWelcome to Jackpot City Hotel & Casino, located 제주도 출장안마 just 광주 출장마사지 10 평택 출장샵 minutes west of 경주 출장안마 Reno, Nevada. We offer over 1,000 slot machines, 밀양 출장마사지 video poker, live dealer