Commander
Commander
584 views

REST shim returning "error" status on "200 OK" response

I'm having weird issue with the REST driver where the endpoint returns a "200 OK" message (and everything processed properly) but the driver shim is setting the status level to "error". Is there something I am doing wrong here?


16:34:31 11CC Drvrs: REST-C360 ST: Submitting document to subscriber shim:
16:34:31 11CC Drvrs: REST-C360 ST:
<nds dtdversion="4.0" ndsversion="8.x">
<source>
<product edition="Advanced" version="4.5.4.0">DirXML</product>
<contact>NetIQ Corporation</contact>
</source>
<input>
<driver-operation-data class-name="JobTitleId" command="add" dest-dn="Test Job Title X" event-id="AMIDVAULT2-NDS#20180131213430#4#1:1a92131e-16b3-474d-889d-11f00edb68ec">
<request>
<url-token token="YI92trR1g80EjiWjOn9SnFdfgeMSWz3bhgzTvTlkFKiXVhFxhWpRQ409oOkafXbqwW7adVz1ays%3D"/>
<header content-type="application/xml"/>
<value><Object><Field Token="Text"><Value action="Set">Test Job Title X</Value>
</Field>
</Object></value>
</request>
</driver-operation-data>
<add class-name="JobTitleId" dest-dn="Test Job Title X" event-id="AMIDVAULT2-NDS#20180131213430#4#1:1a92131e-16b3-474d-889d-11f00edb68ec"/>
</input>
</nds>
16:34:31 11CC Drvrs: REST-C360 ST: Compliance360: sub-execute
16:34:31 11CC Drvrs: REST-C360 ST: Compliance360: addHandler
16:34:31 11CC Drvrs: REST-C360 ST: Compliance360: addHandler: class-name == 'JobTitleId'
16:34:31 11CC Drvrs: REST-C360 ST: Compliance360: Add: preparing POST to https://secure.compliance360.com/API/2.0/Data/Lookup/Employee/JobTitleId?token=YI92trR1g80EjiWjOn9SnFRx7eMSWz3bhgzTvTlkFKiXVhFxhWpRQ409oOkafXbqwW7adVz1ays%3D
16:34:31 11CC Drvrs: REST-C360 ST: Compliance360: Setting the following HTTP request properties:
Authorization: <content suppressed>
16:34:31 11CC Drvrs: REST-C360 ST: Compliance360: content-type:application/xml
16:34:31 11CC Drvrs: REST-C360 ST: Compliance360: Did a HTTP POST with 91 bytes of data to https://secure.compliance360.com/API/2.0/Data/Lookup/Employee/JobTitleId?token=YI92trR1g80EjiWjOn9SnFRx7efghMSWz3bhgzTvTlkFKiXVhFxhWpRQ409oOkafXbqwW7adVz1ays%3D
16:34:31 11CC Drvrs: REST-C360 ST: Compliance360: Response code and message: 200 OK
16:34:31 11CC Drvrs: REST-C360 ST: SubscriptionShim.execute() returned:
Wednesday, January 31, 2018
16:34:31 11CC Drvrs: REST-C360 ST:
<nds dtdversion="3.0">
<source>
<product build="20170130_0359" version="1.0.0.1">Identity Manager REST Driver</product>
<contact>NetIQ Corporation.</contact>
</source>
<output>
<status event-id="AMIDVAULT2-NDS#20180131213430#4#1:1a92131e-16b3-474d-889d-11f00edb68ec" level="error" type="driver-general">
<driver-operation-data class-name="JobTitleId" command="add" dest-dn="" event-id="AMIDVAULT2-NDS#20180131213430#4#1:1a92131e-16b3-474d-889d-11f00edb68ec">
<response>
<url-token token="YI92trR1g80EjiWjOn9SnFRx7eMSWz3bhgzTvTlkFKiXVghfhFxhWpRQ409oOkafXbqwW7adVz1ays%3D"/>
<header content-type="application/xml"/>
16:34:31 11CC Drvrs: <value><Object Token="Lookup/Employee/JobTitleId:4661"><Field Token="Text"><Value>Test Job Title X</Value></Field></Object></value>
</response>
</driver-operation-data>
</status>
</output>
</nds>
Labels (1)
0 Likes
2 Replies
Knowledge Partner Knowledge Partner
Knowledge Partner

DTesenair;2474656 wrote:
I'm having weird issue with the REST driver where the endpoint returns a "200 OK" message (and everything processed properly) but the driver shim is setting the status level to "error". Is there something I am doing wrong here?


16:34:31 11CC Drvrs: REST-C360 ST: Submitting document to subscriber shim:
16:34:31 11CC Drvrs: REST-C360 ST:
<nds dtdversion="4.0" ndsversion="8.x">
<source>
<product edition="Advanced" version="4.5.4.0">DirXML</product>
<contact>NetIQ Corporation</contact>
</source>
<input>
<driver-operation-data class-name="JobTitleId" command="add" dest-dn="Test Job Title X" event-id="AMIDVAULT2-NDS#20180131213430#4#1:1a92131e-16b3-474d-889d-11f00edb68ec">
<request>
<url-token token="YI92trR1g80EjiWjOn9SnFdfgeMSWz3bhgzTvTlkFKiXVhFxhWpRQ409oOkafXbqwW7adVz1ays%3D"/>
<header content-type="application/xml"/>
<value><Object><Field Token="Text"><Value action="Set">Test Job Title X</Value>
</Field>
</Object></value>
</request>
</driver-operation-data>
<add class-name="JobTitleId" dest-dn="Test Job Title X" event-id="AMIDVAULT2-NDS#20180131213430#4#1:1a92131e-16b3-474d-889d-11f00edb68ec"/>
</input>
</nds>
16:34:31 11CC Drvrs: REST-C360 ST: Compliance360: sub-execute
16:34:31 11CC Drvrs: REST-C360 ST: Compliance360: addHandler
16:34:31 11CC Drvrs: REST-C360 ST: Compliance360: addHandler: class-name == 'JobTitleId'
16:34:31 11CC Drvrs: REST-C360 ST: Compliance360: Add: preparing POST to https://secure.compliance360.com/API/2.0/Data/Lookup/Employee/JobTitleId?token=YI92trR1g80EjiWjOn9SnFRx7eMSWz3bhgzTvTlkFKiXVhFxhWpRQ409oOkafXbqwW7adVz1ays%3D
16:34:31 11CC Drvrs: REST-C360 ST: Compliance360: Setting the following HTTP request properties:
Authorization: <content suppressed>
16:34:31 11CC Drvrs: REST-C360 ST: Compliance360: content-type:application/xml
16:34:31 11CC Drvrs: REST-C360 ST: Compliance360: Did a HTTP POST with 91 bytes of data to https://secure.compliance360.com/API/2.0/Data/Lookup/Employee/JobTitleId?token=YI92trR1g80EjiWjOn9SnFRx7efghMSWz3bhgzTvTlkFKiXVhFxhWpRQ409oOkafXbqwW7adVz1ays%3D
16:34:31 11CC Drvrs: REST-C360 ST: Compliance360: Response code and message: 200 OK
16:34:31 11CC Drvrs: REST-C360 ST: SubscriptionShim.execute() returned:
Wednesday, January 31, 2018
16:34:31 11CC Drvrs: REST-C360 ST:
<nds dtdversion="3.0">
<source>
<product build="20170130_0359" version="1.0.0.1">Identity Manager REST Driver</product>
<contact>NetIQ Corporation.</contact>
</source>
<output>
<status event-id="AMIDVAULT2-NDS#20180131213430#4#1:1a92131e-16b3-474d-889d-11f00edb68ec" level="error" type="driver-general">
<driver-operation-data class-name="JobTitleId" command="add" dest-dn="" event-id="AMIDVAULT2-NDS#20180131213430#4#1:1a92131e-16b3-474d-889d-11f00edb68ec">
<response>
<url-token token="YI92trR1g80EjiWjOn9SnFRx7eMSWz3bhgzTvTlkFKiXVghfhFxhWpRQ409oOkafXbqwW7adVz1ays%3D"/>
<header content-type="application/xml"/>
16:34:31 11CC Drvrs: <value><Object Token="Lookup/Employee/JobTitleId:4661"><Field Token="Text"><Value>Test Job Title X</Value></Field></Object></value>
</response>
</driver-operation-data>
</status>
</output>
</nds>


Does this help:

https://forums.novell.com/showthread.php/500283-REST-Driver-and-status-ERROR-for-200-OK-responses
0 Likes
Knowledge Partner Knowledge Partner
Knowledge Partner

DTesenair <DTesenair@no-mx.forums.microfocus.com> wrote:
>

I'm having weird issue with the REST driver where the endpoint returns a
"200 OK" message (and everything processed properly) but the driver shim
is setting the status level to "error". Is there something I am doing
wrong here?
>
>


Yes. Working as designed.

An add should return 201 not 200 as well as a reference to the newly
created object in the response.

This is something I have seen many implementations get wrong.

200 is correct response for other scenarios like update/modify.
Alex McHugh - Knowledge Partner - Stavanger, Norway
Who are the Knowledge Partners
If you appreciate my comments, please click the Like button.
If I have resolved your issue, please click the Accept as Solution button.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.