DriverResponseData gives ERROR: There is an error in XML document (1, 352) on SOAP Calls

When sending a SOAP call using the MessageId “DriverCommand” (the Data is of the type “DriverCommandData” with the Parameter property set to a string of a valid SOAP call, to be sent to the camera), the response is sent back in a DriverResponse message. I have a receiver registered for it, and it triggers properly, but message.data (of type DriverResponseData) has a false Success property and ErrorText is “ERROR: There is an error in XML document (1, 352)”. This is using an “ONVIF Conformant Device” driver and an ONVIF compliant camera.

Tracing the calls using Wireshark, what I see is that the message string sent out (an XML string representing a valid SOAP call) is escaped (ie, “<” is replaced with “<”) and Wireshark on the server shows the correct SOAP call is sent out to the camera. Wireshark on the server shows the correct SOAP response coming back from the camera, so all good there. Wireshark on the client computer shows the response string from the camera is put into the “SendDriverCommandWithResponseResult” XML tag in the “SendDriverCommandWithResponseResponse” SOAP message and it is the correct string, but it isn’t escaped properly (ie, it has “<” instead of “<”). Counting the characters from the start of the message body, character 352 corresponds to the “x” in “<?xml” at the start of the response from the camera (which is exactly where I would expect an XML parser to balk).

Is this a bug in the Send Driver Command Response method in the Onvif Conformant Device Driver where it doesn’t properly escape the response string before serializing it into the XML? Is it likely to be fixed in the near future, or is it possible for me to fix it (ie, by overriding a function somewhere, or perhaps a property I need to set)? Is there a way I can send and receive SOAP calls to/from a camera from a client plugin (I’m doing this in a Management/Admin Client Plugin right now, but I expect to need the functionality in a Smart Client Plugin in the future), or will I need to write my own driver plugin?