Thursday, November 23, 2006

Failing to import WSDL file?


Seen days ago: there’s a WSDL file, MS VB.NET 2005 Express and a programmer planning to attach his VB.NET application to a WebService described with given WSDL file.
Insert in project WSDL file, build it – and get the error:



Quick solution: use WSDL compiler, compile the WSDL file, specify target language (/language:cs or /language:vb) and bind then the produced source file to your project instead of inserting the .wsdl file). It works!
Otherwise get ready to perform manual changes in the WSDL file to get it imported properly into you project. Do not ask why.
Enjoy!