Visual Studio 2003 and WSDLs without a SOAP 1.1 binding

Posted by dave
on May 04, 2007 @ 12:55 PM

Arggh. Here's a cryptic error from Visual Studio 2003 to watch out for when trying to add a SOAP/HTTP Web Reference.


Custom tool warning: DiscoCodeGenerator unable to initialize code generator.  No code generated.

In this case the WSDL was generated by Artix, and it only contained a SOAP 1.2 binding. This wsdl definitons looked like this:


<definitions name="my_server" 
    targetNamespace="http://schemas.iona.com/idl/my_server.idl" 
    xmlns="http://schemas.xmlsoap.org/wsdl/" 
    xmlns:corba="http://schemas.iona.com/bindings/corba" 
    xmlns:corbatm="http://schemas.iona.com/typemap/corba/my_server.idl" 
    xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" 
    xmlns:tns="http://schemas.iona.com/idl/my_server.idl" 
    xmlns:wsa="http://www.w3.org/2005/08/addressing" 
    xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
    xmlns:xsd1="http://schemas.iona.com/idltypes/my_server.idl">

The error is caused because there is no SOAP 1.1 binding/namespace in the WSDL. In order to make it work you have to use(or add) a SOAP 1.1 binding - or switch to VS2005 which supports SOAP 1.2.