Rest Driver and Resource Handler

Dear all,

I tough I understood the concept of the REST driver, but I do not get it to work with a custom Ressource defined.

Sine the API I am working with needs some other parameters in the URL, I defined a new Resource for the class/schema to be synchronised and introduced a new OTP to add some custom driver-operation-data element to the XDS command send to the shim.

According to my trace ( set to level 10) I can see the driver-operation-data element added to the XDS as planend, but after submitting it to the shim the driver is reporting a fatal error caused by a null pointer exception.

Unfortunatly there is not more information available, what kind of data might be missing!

According  to the documentation it is not mandatory to add an authorisation header in the driver-operation-data element but even if this would be the issue I would expect a authentication error or something - not a null pointer exception.

Can anybody provide an idea, what I am doing wrong, or a working example how to use an custom resource handler with the REST driver

Kind regards 

Thorsten

Parents
  • 0  

    Hi Thorsten,

    On thing I've run into was that the shim would thrown an exception (fatal) when <value/> was not part of the request.

    Cheers,

    Casper

  • 0 in reply to   

    Hi Casper,

    thanks for your fast reply 

    I will check your suggestion first thing tomorrow!

    Will the auth-header be needed as well in the driver-operaton-data or will this be added by the shim based on the driver parameters automatically?

    Cheers

    Thorsten

  • Verified Answer

    +1   in reply to 

    My pleasure.

    I always have:

    <driver-operation-data>
        <request>
            <url-token filter or association/>
            <header/>
            <value/>
        </request>
    </driver-operation-data>

    The scim is buggy, they have over time fixed some things, but to my knowledge it will only thrown an except if you do not have <value/>. It is a bug, but I do not see it being fixed even if someone made them aware of it.

    As for <header/> I do not know, I would say try.

    Oh, you mentioned that you do your own custom class, remember that you have to have minimum method in the request. As per: www.netiq.com/.../driver-concepts.html

Reply
  • Verified Answer

    +1   in reply to 

    My pleasure.

    I always have:

    <driver-operation-data>
        <request>
            <url-token filter or association/>
            <header/>
            <value/>
        </request>
    </driver-operation-data>

    The scim is buggy, they have over time fixed some things, but to my knowledge it will only thrown an except if you do not have <value/>. It is a bug, but I do not see it being fixed even if someone made them aware of it.

    As for <header/> I do not know, I would say try.

    Oh, you mentioned that you do your own custom class, remember that you have to have minimum method in the request. As per: www.netiq.com/.../driver-concepts.html

Children
  • 0 in reply to   

    Hi Casper,

    Thanks for your help - you are 100% correct - all xml elements under driver-operation-data are mandatory - if one is missing the shim is returning a null pointer exception.

    I ain't a software developer, but I believe you are right, this is a bug in the shim! At least the documentation should be updated to stress the fact, that even if no (additional) header or request payload is needed, the corresponding XML elements have to be provided!

    After providing both header and value elements in driver-operation-data, the null pointer exeprtion is gone!

    But now I am facing an application error:

    <nds dtdversion="3.0">
    <source>
    <product build="20181130_1107" version="1.0.2.0">Identity Manager REST Driver</product>
    <contact>NetIQ Corporation.</contact>
    </source>
    <output>
    <status level="error" type="app-general">URISyntaxException: Illegal character in query at index 98: XXXXXXXXXXXXXXXXXXXXXXXXXXX.yyyyyyyyyy.zzzz/.../opx2_user = name eq 'N10001'</status>
    </output>
    </nds>

    Do you know, if it is mandatory to encode the URL, before it is send to the shim? I was assuming this would fall under the responsibility of the shim, but maybe I am wrong.

    BTW: Running the whole URL in Postman is not running into an error!