How to remove "urn:" prefix from MessageId of WCF DiscoveryClient.Find Probe? RRS feed

  • Question

  • I am testing some ONVIF cameras and finding that a problem occurs because the ProbeMatch messageId and relatesTo fields don't contain valid URN values. For example, in response to a Probe with MessageID = 'urn:uuid:aa919c2e-0973-4879-9f47-7ab059bf641e', the camera returns a ProbeMatch with messageId = 'uuid:ae804eb2-13e3-49ad-9f7f-000F7C0D7610' and relatesTo = 'uuid:aa919c2e-0973-4879-9f47-7ab059bf641e'. Although these GUID values match, neither of them conform to WS Addressing that requires these to be URN's, i.e., having the prefix "urn:".  When the Windows Communication Foundation DiscoveryClient generates the Probe, and then the ProbeMatch is received from the camera, WCF gives the following error:

    A ProbeMatches message with messageId='uuid:ae804eb2-13e3-49ad-9f7f-000F7C0D7610' and relatesTo='uuid:aa919c2e-0973-4879-9f47-7ab059bf641e' was dropped by the DiscoveryClient because either the corresponding Find operation was completed or the relatesTo value is invalid.

    Evidently, it recognizes that the relatesTo is lacking the "urn:" prefix of the corresponding messageID.

    If the WCF Probe could be modified to remove the "urn:" prefix, then the ProbeMatches of these cameras would be correctly processed.  How to do that with the DiscoveryClient class?  Or, is there some other way to generate the Probe?

    Ron Woods

    • Edited by raja8ron Tuesday, July 7, 2015 1:50 AM
    Tuesday, July 7, 2015 1:47 AM

All replies