Boa noite a todos.
Realizei o cadastro no usuário do WebService (AppKey e AppToken) seguindo o que estava definido em http://help.vtex.com/pt/tutorial/criar-appkey-e-apptoken-para-autenticar-integracoes.
Fiz a autenticação, com o objetivo de testar, via navegador através do endereço: https://webservice-[loja].vtexcommerce.com.br/service.svc?wsdl
O XML de definição do WSDL é exibido sem problemas (Omiti o restante):
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://tempuri.org/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" name="Service" targetNamespace="http://tempuri.org/">
<wsdl:types>
Agora estou tentando adicionar a referência ao serviço na minha aplicação .net (informando o appKey e appToken da mesma forma que fiz através do navegador) e quando tento fazer a importação, recebo o erro abaixo.
The document was understood, but it could not be processed.
- The WSDL document contains links that could not be resolved.
- There was an error downloading 'http://webservice-[Loja].vtexcommerce.com.br/AdminWebService/Service.svc?xsd=xsd2'.
- The request failed with HTTP status 401: Access Denied.
Metadata contains a reference that cannot be resolved: 'https://webservice-[Loja].vtexcommerce.com.br/service.svc?wsdl'.
The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the server was 'Basic Realm="Please Login to VtexID"'.
The remote server returned an error: (401) Unauthorized.
If the service is defined in the current solution, try building the solution and adding the service reference again.
Tentei fazer a referência do serviço pelos dois métodos de Add Service Reference do Visual Studio (Modo normal e avançado) e nos dois o erro ocorre.
Pesquisei na comunidade pelo erro: Basic Realm="Please Login to VtexID" e a única resposta encontrada é de que houve uma instabilidade. Mas isso foi em 3 de agosto...
Alguém pode me ajudar?
Desde já agradeço!
[EDIÇÃO]
Não sei se o problema pode estar relacionado ao entrypoint ser https e os demais imports serem http. Pois tentei http://webservice-[loja].vtexcommerce.com.br/AdminWebService/Service.svc?xsd=xsd2 e ele conecta corretamente através do navegador.