C# - 添加UPS Tracking API参考时出错

时间:2016-01-17 22:13:55

标签: c# web-services soap asp.net-web-api2 ups-api

我正在尝试使用网址Console/Asp.Net Web API向我的http://onlinetools.ups.com/webservices/Track项目添加UPS跟踪API参考。

App.Config/Web.Config中添加此设置,但仍无效:

  <add key="AccessLicenseNumber" value="xxxxxxx"/>
  <add key="UserId" value="xxxxxxxx"/>
  <add key="Password" value="xxxxx"/>

我在上述网址找不到任何网络服务,而是提供以下消息:

Service Name: TrackWS
Remote User: null
Server Port: 443
Server Name: wwwcie.ups.com
Servlet Path: /Track

错误:

There was an error downloading 'http://onlinetools.ups.com/webservices/Track/ metadata'. Unable to connect to the remote server
A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 153.2.224.76:80
Metadata contains a reference that cannot be resolved: 'http://onlinetools.ups.com/webservices/Track'.
There was no endpoint listening at http://onlinetools.ups.com/webservices/Track that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.

非常感谢任何帮助。

谢谢,

WH

1 个答案:

答案 0 :(得分:0)

首先,我建议您访问UPS的开发者资源网站,然后继续创建一个帐户。它简短易行。

拥有帐户后,您可以下载示例代码和文档,逐步指导您如何与其服务集成。所提供的文档还包括您要设置的必要WSDL网络服务参考。

这是指向其开发者网站的链接。 https://www.ups.com/upsdeveloperkit/

希望有所帮助!干杯!