Search code examples
.netsoapwsdl

wsdl.exe Error: Unable to import binding '...' from namespace '...'


When running wsdl.exe on a WSDL I created, I get this error:

Error: Unable to import binding 'SomeBinding' from namespace 'SomeNS'.

  • Unable to import operation 'someOperation'.
  • These members may not be derived.

I'm using the document-literal style, and to the best of my knowledge I'm following all the rules.

To sum it up, I have a valid WSDL, but the tool doesn't like it.

What I'm looking for is if someone has lots of experience with the wsdl.exe tool and knows about some secret gotcha that I don't.


Solution

  • I have came across to the same error message. After digging for a while, found out that one can supply xsd files in addition to wsdl file. So included/imported .xsd files in addition to .wsdl at the end of the wsdl command as follows:

    wsdl.exe myWebService.wsdl myXsd1.xsd myType1.xsd myXsd2.xsd ...

    Wsdl gave some warnings but it did create an ok service interface.