我正在尝试将 UPS 跟踪 API 引用添加到我的 Console/Asp.Net Web API
项目使用 URL http://onlinetools.ups.com/webservices/Track
.
在 App.Config/Web.Config
中添加此设置, 但仍然没有帮助:
<add key="AccessLicenseNumber" value="xxxxxxx"/>
<add key="UserId" value="xxxxxxxx"/>
<add key="Password" value="xxxxx"/>
我在上面的 URL 上找不到任何网络服务,而是给出了以下消息:
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
最佳答案
首先,我建议您访问 UPS 的开发人员资源网站并创建一个帐户。它简短且易于完成。
一旦您拥有一个帐户,您就可以下载示例代码和文档,它们将指导您逐步了解如何与他们的服务集成。所提供的文档还包括您正在寻找的必要的 WSDL,以设置一个Web 服务引用。
这是他们开发者网站的链接。 https://www.ups.com/upsdeveloperkit/
希望对您有所帮助!干杯!
关于C# - 添加 UPS 跟踪 API 引用时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34844394/