title: The prefix 'xmlns' can only be bound to the namespace 'http://www.w3.org/2000/xmlns/'
body: <p>I'm trying to build a ONVIF server using c# and wcf. Most are connecting just fine with my service ( ONVIF device manager and ispy ) but not exacqVision. Causing the error: </p>
  
  <pre><code>A first chance exception of type 'System.Xml.XmlException' occurred in
  System.Runtime.Serialization.dll
  
  Additional information: The prefix 'xmlns' can only be bound to the namespace
  'http://www.w3.org/2000/xmlns/'.
  </code></pre>
  
  <p>I'm guessing it's because of the xmlns:xmlns="http://tempuri.org/xmlns.xsd" in it's soap envelope. </p>
  
  <p>Is there a way to fix this on the server side using c#/wcf? ONVIF cameras connect just fine with exacqVision so it's not a problem for them.</p>
  
  <p>looks like exacqVision is using gSOAP/2.8. Which is recommended but I would prefer to do this in C#.</p>
  
  <p>I've searched the ONVIF site with no luck. I'd prefer not to spend the money on becoming a ONVIF member as this seems to be a soap problem not an ONVIF one.</p>
  
  <p>Here's the binding generated with SvcUtil:</p>
  
  <pre><code>&lt;binding name="DeviceBinding"&gt;
            &lt;textMessageEncoding maxReadPoolSize="64" maxWritePoolSize="16"
                messageVersion="Soap12" writeEncoding="utf-8"&gt;
              &lt;readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
                  maxBytesPerRead="4096" maxNameTableCharCount="16384" /&gt;
            &lt;/textMessageEncoding&gt;
            &lt;httpTransport manualAddressing="false" maxBufferPoolSize="524288"
                maxReceivedMessageSize="65536" allowCookies="false" authenticationScheme="Anonymous"
                bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
                keepAliveEnabled="true" maxBufferSize="65536" proxyAuthenticationScheme="Anonymous"
                realm="" transferMode="Buffered" unsafeConnectionNtlmAuthentication="false"
                useDefaultWebProxy="true" /&gt;
          &lt;/binding&gt;
  
  And here's exacqVision's soap call:
  
       POST /onvif/device_service HTTP/1.1
          Host: ---
          User-Agent: gSOAP/2.8
          Content-Type: application/soap+xml; charset=utf-8; action="http://www.onvif.org/ver10/device/wsdl/GetSystemDateAndTime"
          Content-Length: 2341
          Connection: close
          SOAPAction: "http://www.onvif.org/ver10/device/wsdl/GetSystemDateAndTime"
  
          &lt;?xml version="1.0" encoding="UTF-8"?&gt;
          &lt;SOAP-ENV:Envelope 
      xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" 
      xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding" 
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
      xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" 
      xmlns:c14n="http://www.w3.org/2001/10/xml-exc-c14n#" 
      xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:xenc="http://www.w3.org/2001/04/xmlenc#" 
      xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" 
      xmlns:wsa5="http://www.w3.org/2005/08/addressing" 
      xmlns:xmlns="http://tempuri.org/xmlns.xsd" 
      xmlns:xop="http://www.w3.org/2004/08/xop/include" 
      xmlns:xmime="http://tempuri.org/xmime.xsd" 
      xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:wsrfbf="http://docs.oasis-open.org/wsrf/bf-2" xmlns:wstop="http://docs.oasis-open.org/wsn/t-1" 
      xmlns:wsrfr="http://docs.oasis-open.org/wsrf/r-2" 
      xmlns:tanae="http://www.onvif.org/ver10/analytics/wsdl/AnalyticsEngineBinding" 
      xmlns:tanre="http://www.onvif.org/ver10/analytics/wsdl/RuleEngineBinding" 
      xmlns:tan="http://www.onvif.org/ver10/analytics/wsdl" 
      xmlns:tds="http://www.onvif.org/ver10/device/wsdl" 
      xmlns:tevcpp="http://www.onvif.org/ver10/events/wsdl/CreatePullPointBinding" 
      xmlns:teve="http://www.onvif.org/ver10/events/wsdl/EventBinding" 
      xmlns:tevnc="http://www.onvif.org/ver10/events/wsdl/NotificationConsumerBinding" 
      xmlns:tevnp="http://www.onvif.org/ver10/events/wsdl/NotificationProducerBinding" 
      xmlns:tevpp="http://www.onvif.org/ver10/events/wsdl/PullPointBinding" 
  xmlns:tevpps="http://www.onvif.org/ver10/events/wsdl/PullPointSubscriptionBinding" 
  xmlns:tev="http://www.onvif.org/ver10/events/wsdl" 
  
  xmlns:tevpsm="http://www.onvif.org/ver10/events/wsdl/PausableSubscriptionManagerBinding" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" 
  xmlns:tevsm="http://www.onvif.org/ver10/events/wsdl/SubscriptionManagerBinding" 
  xmlns:timg="http://www.onvif.org/ver20/imaging/wsdl" 
  xmlns:tptz="http://www.onvif.org/ver10/ptz/wsdl" 
  xmlns:tptz2="http://www.onvif.org/ver20/ptz/wsdl" 
  xmlns:trt="http://www.onvif.org/ver10/media/wsdl"&gt;&lt;SOAP-ENV:Body&gt;&lt;tds:GetSystemDateAndTime&gt;&lt;/tds:GetSystemDateAndTime&gt;&lt;/SOAP-ENV:Body&gt;&lt;/SOAP-ENV:Envelope&gt;
  </code></pre>