Home

Results 1 to 9 of 9

Thread: REST driver character encoding

Threaded View

  1. #1
    Join Date
    Jun 2016
    Posts
    7

    REST driver character encoding

    I am developing an interface using the REST driver and am having an interesting issue with character encoding. Essentially, the target host is returning XML with UTF-16 encoding. However, the REST driver shim does not seem to be able to handle this and is inserting bogus characters. At first, I thought this might be just an issue with the trace screen but subsequently determined that the XML parser in IDM cannot interpret it, either.

    This looks like a legitimate bug but I thought I'd post it here before submitting a bug report.

    Any thoughts?

    Here is a snippet of the trace:
    15:48:15 4D4 Drvrs: REST-C360v2 ST: Compliance360(v2): Did a HTTP POST with 0 bytes of data to https://secure.compliance360.com/API/2.0/Security/Login
    15:48:15 4D4 Drvrs: REST-C360v2 ST: Compliance360(v2): Response code and message: 200 OK
    15:48:15 4D4 Drvrs: REST-C360v2 ST: SubscriptionShim.execute() returned:
    15:48:15 4D4 Drvrs: REST-C360v2 ST:
    <nds dtdversion="3.0">
    <source>
    <product build="20150722_0750" version="1.0.0.0">Identity Manager REST Driver</product>
    <contact>NetIQ Corporation.</contact>
    </source>
    <output>
    <status event-id="0" level="success" type="driver-general">
    <driver-operation-data class-name="Security" command="query" dest-dn="" event-id="0">
    <response>
    <url-token token=""/>
    <header content-type="application/xml"/>
    15:48:15 4D4 Drvrs: <value><?xml version="1.0" encoding="utf-16"?><Token><Value>YI92tr R1g83myd59sPEPnkuTJ5AN8xf aOuHRDFj5po%3D</Value></Token></value>
    </response>
    </driver-operation-data>
    </status>
    </output>
    </nds>

    EDIT: I just tried to simply set the value of the response to a string and got the following result:
    15:48:15 4D4 Drvrs: REST-C360v2 ST: Action: do-set-local-variable("token-string",scope="policy",token-xpath("driver-operation-data/response/value")).
    15:48:15 4D4 Drvrs: REST-C360v2 ST: arg-string(token-xpath("driver-operation-data/response/value"))
    15:48:15 4D4 Drvrs: REST-C360v2 ST: token-xpath("driver-operation-data/response/value")
    15:48:15 4D4 Drvrs: REST-C360v2 ST: Token Value: "<
    15:48:15 4D4 Drvrs: REST-C360v2 ST: Arg Value: "<

    ...and if I try to parse it...
    15:48:15 4D4 Drvrs: REST-C360v2 ST: Action: do-set-local-variable("token-nodeset",scope="policy",arg-node-set(token-xml-parse(token-xpath("driver-operation-data/response/value")))).
    15:48:15 4D4 Drvrs: REST-C360v2 ST: arg-node-set(token-xml-parse(token-xpath("driver-operation-data/response/value")))
    15:48:15 4D4 Drvrs: REST-C360v2 ST: token-xml-parse(token-xpath("driver-operation-data/response/value"))
    15:48:15 4D4 Drvrs: REST-C360v2 ST: token-xml-parse(token-xpath("driver-operation-data/response/value"))
    15:48:15 4D4 Drvrs: REST-C360v2 ST: token-xpath("driver-operation-data/response/value")
    15:48:15 4D4 Drvrs: REST-C360v2 ST: Token Value: "<
    15:48:15 4D4 Drvrs: REST-C360v2 ST: Arg Value: "<
    15:48:15 4D4 Drvrs: REST-C360v2 ST:
    DirXML Log Event -------------------
    Driver: \HF_IDVAULT\HF\SERVICES\DirXML\IDM-Consumers\Compliance360(v2)
    Channel: Subscriber
    Status: Warning
    Message: Code(-8034) Error in vnd.nds.stream://HF_IDVAULT/HF/SERVICES/DirXML/IDM-Consumers/Compliance360%28v2%29/HF-itp-RESTtoXDS#XmlData:41: Couldn't get XML document 'token-xml-parse': '': (1): character not allowed
    Last edited by DTesenair; 19-Jan-2018 at 10:07 PM. Reason: Added additional information

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •