Consumindo wsdl com C#

0 respostas
Roger75
Pelo Visual Studio estou tentando consumir um serviço. Procurando no Google vi que recomendaram fazer o seguinte:
System.ServiceModel.Channels.Binding binding = new System.ServiceModel.WSHttpBinding();
          

           System.ServiceModel.EndpointAddress endpointAddress = new EndpointAddress("http://endereco:8080/Service/SB?wsdl");

          
            SBClient cli = new SBClient(binding, endpointAddress);
        
            String hello= cli.hello();

Mas está dando o seguinte erro:

ProtocolException: Content Type application/soap+xml; charset=utf-8 was not supported by service http://endereco:8080/Service/SB?wsdl. The client and service bindings may be mismatched.]

O que será?

Criado 6 de março de 2012
Respostas 0
Participantes 1