I built a C# windows app that uses a web service and it is working fine. I am building a C# Console app which will be used in the scheduler to automate the process and run at night. I am having issues adding the same service reference to the console app. I get an error while trying to add the service reference. I do not understand why I get this error on the console app but not the windows form app.
I get the below error on adding the service reference. Any ideas or help appreciated.
Cannot import wsdl:port\r\nDetail: \r\nXPath to Error Source: //wsdl:definitions[@targetNamespace='https://www.cbh.com/']/wsdl:service[@name='ExportService']/wsdl:port[@name='ExportServiceHttpPost'] Cannot import wsdl:binding\r\nDetail: The required WSDL extension element 'binding' from namespace 'http://schemas.xmlsoap.org/wsdl/http/' was not handled.\r\nXPath to Error Source: //wsdl:definitions[@targetNamespace='https://www.cbh.com/']/wsdl:binding[@name='ExportServiceHttpPost'] Cannot import wsdl:port\r\nDetail: \r\nXPath to Error Source: //wsdl:definitions[@targetNamespace='https://www.cbh.com/']/wsdl:service[@name='ExportService']/wsdl:port[@name='ExportServiceHttpGet'] Cannot import wsdl:binding\r\nDetail: The required WSDL extension element 'binding' from namespace 'http://schemas.xmlsoap.org/wsdl/http/' was not handled.\r\nXPath to Error Source: //wsdl:definitions[@targetNamespace='https://www.cbh.com/']/wsdl:binding[@name='ExportServiceHttpGet']
For this situation, the wsdl does not seem to match the schema reference of the data contract serializer. You may refer to the case for more help.