Sometime back I came across this error while generating Proxy class from a service WSDL. The Proxy class that got generated had nothing but this error –
// This code was generated by a tool.
// Runtime Version:4.0.30319.18444
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// CODEGEN: The binding ‘exampleService’ from namespace ‘http://example.com/’ was ignored. There is no SoapTransportImporter that understands the transport ‘http://www.w3.org/2003/05/soap/bindings/HTTP/’.
// This source code was auto-generated by wsdl, Version=4.0.30319.33440.
As the service was hosted by 3rd party, there was nothing much that could be done at service level. Finally found a solution on MSDN which worked perfectly.
- First, generate the WSDL and XSD files of the service on your local machine. For that, open VS command prompt and execute the following command-
svcUtil /t:metadata [ServiceEndpoint?wsdl]
- The WSDL and XSD files will be saved to a local folder. Now open the WSDL file in notepad and replace the
and save it.
- Now use wsdl.exe to generate the Proxy/reference class file. Execute the following command in VS command prompt-
If it has both WSDL and XSD files-
wsdl.exe [example.wsdl] [example.xsd]
Note: The example.wsdl and example.xsd here refer to the local WSDL file and not the service endpoint.
- Proxy class will be generated at the same location with complete data. 🙂
In case of any issues, please comment.
Thanks for checking out !
- Switch between multiple proxies in Chrome browser [ProxySwitchy Guide] - February 12, 2016
- CISCO VPN CLIENT -REASON 442: FAILED TO ENABLE VIRTUAL ADAPTER [Fix] - January 31, 2016
- CynogenMod 13 (Android Marshmallow [6.0]) on Samsung Galaxy S3 GT-I9300. [21-12-2015] - December 21, 2015