Converting WSDL to C# classes

If you got the WSDL with you it is straightforward to create the C# proxy class.

Below mentioned is one of the way to do it. If your WSDL data is not exposed via a URL. First save the Available WSDL data into a file say "D:\MerchantService.wsdl"

svcutil.exe D:\MerchantService.wsdl /t:code /l:c# /o:"D:\MerchantService.cs" /n:*,NamespaceName 

Refrence : http://msdn.microsoft.com/en-us/library/aa347733.aspx


Your problem relies in the XSD. svcutil doesn't support restrictions inside a complexContent tag: http://msdn.microsoft.com/en-us/library/ms733112.aspx

The msdn says it's actualy forbidden:

enter image description here

Tags:

C#

Soap

Wsdl