[midPoint] Search look up table using Midpoint Java Rest Client 4.4

Tao Jiang t.jiang at unsw.edu.au
Mon Feb 21 07:14:05 CET 2022


Dear Midpoint community,

I have tried to use Midpoint Java Rest Client (version 4.4) to search Look up table using the code below:

public void searchLookupTable() throws Exception {
              Service service = getService();
              ItemPathType namePath = new ItemPathType();
              namePath.setValue("name");
              SearchResult<LookupTableType> result = (SearchResult<LookupTableType>) service.lookupTables().search().queryFor(LookupTableType.class).item(namePath).eq("UAC Lookup").get();

       }

The last statement ran into java.lang.NullPointerException.
I can confirm the "UAC Lookup" look up table exists by execute the following query via curl command.
<query xmlns=http://prism.evolveum.com/xml/ns/public/query-3>
    <filter>
              <equal>
            <path>name</path>
            <value>UAC Lookup</value>
        </equal>
    </filter>
</query>

Could anyone tell me what's wrong with the java code?

Thank you very much in advance!

Kind regards,

Tao Jiang
UNSW IT
Email: t.jiang at unsw.edu.au<mailto:t.jiang at unsw.edu.au>
Phone: +61 2 9065 8771

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20220221/ca09d56b/attachment.htm>


More information about the midPoint mailing list