Error when adding reference to a web service

Asked

Viewed 710 times

0

I am trying to add a reference to a Web Service within my project by Visual Studio and I get this error:

There was an error downloading 'http://sigep.correios.com.br/sigep/update/AtendeClienteService.wsdl/_vti_bin/ListData.svc/$Metadata'. The request failed with HTTP status 404: Not Found.

I add the address that is online by the browser: http://sigep.correios.com.br/sigep/update/AtendeClienteService.wsdl

I’m following the step by step of this site:

https://ehrizo.wordpress.com/2014/12/04/correios-webservice-para-consulta-de-enderecos-a-partir-de-um-cep/

Thank you

  • Mauricio, add more information about your problem. Let me know which line you’re having trouble with, show you your code that might make it easier to help you.

  • So there is no code, in visual mode inside Visual Studio I need to add a reference to this Webservice but when I click on add it returns this error. I can add a screen print here in the post?

  • Yeah, you can. I couldn’t add the reference either. Weird...

  • Hstackoverflow was able to help me. Thank you.

2 answers

1


  • You got it from Visual Studio inside the project?

  • Sorry I messed up, I will test again. I will edit or remove the answer.

  • Okay I await your return. Thank you

  • I edited with the updated address. Test successfully done.

  • I’ll test it. Thank you

  • 1

    Perfect. Thank you.

Show 1 more comment

0

I tried to add the following Endpoint as Service Reference:

http://sigep.correios.com.br/sigep/update/AtendeClienteService.wsdl

Then returned me the following error:

Metadata contains a reference that cannot be resolved: 'http://sigep.correios.com.br/sigep/update/AtendeClienteService.wsdl'.
The remote server returned an unexpected response: (407) authenticationrequired.
The remote server returned an error: (407) Proxy Authentication Required.
If the service is defined in the current solution, try building the solution and adding the service reference again.

To circumvent this error, I downloaded the XML from the WSDL, copied it to my local IIS and added the following address as Service Reference:

http://localhost/Servicesservice.wsdl

  • I will test your solution if it also fits me I mark positive. Thank you.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.