Amusingly MOSS

...It's funny how difficult some stuff is when it really shouldn't be

  Home  |   Contact  |   Syndication    |   Login
  29 Posts | 0 Stories | 34 Comments | 0 Trackbacks

News

Twitter












Tag Cloud


Archives

Post Categories

When trying to generate an ASP.NET proxy class from a physical wsdl on your local file system, you're probably doing something like this:

wsdl.exe MySevice.wsdl /o:Proxy.cs /l:CS

You'd expect a file named Proxy.cs to get created in C# for you.  You'd be right, except if you're attempting to generate proxy for a service that uses complex types.  If that is the case, you'll get an error that looks a lot like this:

Error: Unable to import binding 'MyBinding' from namespace 'http://www.example.org/MyNameSpace/'.
  - Unable to import operation 'MyOperation'.
  - The element 'http://mydomain.com:MyComplexType' is missing.

If you would like more help, please type "wsdl /?".

This error is basically saying that you your service is expecting one or more XSD file containing the definitions for those complex types.  Here's what your command line should look like:

wsdl.exe MySevice.wsdl MyServiceDefinitions.xsd /o:Proxy.cs /l:CS

If you need to add additional XSD files for other complex type definitions, just add them to the command line like you did for the first one, separated by a space (order doesn't matter).

  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati
posted on Friday, October 16, 2009 5:53 AM

Feedback

# re: wsdl.exe - Unable to import binding from namespace 2/7/2010 7:16 PM vani
this may help
http://support.microsoft.com/kb/820122

# re: wsdl.exe - Unable to import binding from namespace 8/19/2010 2:47 AM Glenn Beck
This should be SPECIFICALLY stated in the documentation for the command so we don't have to waste time Binging for it.

Same issue for XSD.exe.

# re: wsdl.exe - Unable to import binding from namespace 1/6/2011 5:38 PM Ben
finally an answer to my problem. THANKS

# re: wsdl.exe - Unable to import binding from namespace 3/9/2011 1:33 AM Edward
Fantastic. I've been looking for this for a good few hours.

# re: wsdl.exe - Unable to import binding from namespace 11/20/2011 10:00 PM dw
doesnt work, same error

Post A Comment
Title:
Name:
Email:
Website:
Comment:
Verification: