逗人, 我从客户端以下Web服务调用: http://ajec.proxym-it.net/Ajec_sso_api/authenticate.wsdl调用Web服务错误“远程服务器返回了意外的响应:(502)连接被拒绝。”
当我尝试使用它,我得到了这个错误: 远程服务器返回了意外的响应:(502)连接被拒绝。
内部异常是:{ “远程服务器返回一个错误:(502)错误的网关。”}
这是我的代码:
AuthenticateService.AuthenticatePortClient oAuthenticatePortClient = new AuthenticateService.AuthenticatePortClient();
AuthenticateService.authenticateRequest oauthenticateRequest = new AuthenticateService.authenticateRequest();
oauthenticateRequest.serviceId = "MobileTeam";
oauthenticateRequest.serviceKey = "AJEC1";
oauthenticateRequest.userName = "MMelhem";
oauthenticateRequest.password = "[email protected]$$w0rd";
AuthenticateService.authenticateResponse oregisterUserResponse = oAuthenticatePortClient.authenticate(oauthenticateRequest);
和在web.config是:
<configuration>
<system.net>
<defaultProxy>
<proxy usesystemdefault="False" bypassonlocal="False" />
</defaultProxy>
</system.net>
<system.web>
<compilation debug="true" targetFramework="4.5" />
<httpRuntime targetFramework="4.5" />
</system.web>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="AuthenticatePortSoap11" />
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://172.16.0.82:80/Ajec_sso_api/authenticate"
binding="basicHttpBinding" bindingConfiguration="AuthenticatePortSoap11"
contract="AuthenticateService.AuthenticatePort" name="AuthenticatePortSoap11" />
</client>
</system.serviceModel>
</configuration>
问题一直这项服务曾经为任何人工作?这是第一次将它作为web服务使用吗?它现在对别人有用吗? HTTP 502意味着坏的网关(后端服务器出现问题)。下一步将是检查(与管理web服务的人)后端的状态(除了用户名/密码是否正确)。 – blackpen
当试图在SoupUI应用程序上测试它时,它会工作,但当试图在代码上使用它时,它不会。 –