Error: “There is no SoapTransportImporter that understands the transport ‘http://www.w3.org/2003/05/soap/bindings/HTTP/'” in the generated reference / Proxy class. [Solution]

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 –

//——————————————————————————
// <auto-generated>
// 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.
// </auto-generated>
//——————————————————————————

// 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.

Solution

  • 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

“http://www.w3.org/2003/05/soap/bindings/HTTP/” 

with

“http://schemas.xmlsoap.org/soap/http” 

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]

else

wsdl.exe [example.wsdl]

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 !

Categories
Comments
All comments.
Comments

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.