C# - 添加 UPS 跟踪 API 引用时出错

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

我正在尝试将 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/

相关文章:

web-services - 最佳 SOAP/REST/RPC Web API 的示例?你为什么喜欢他们?他们有什么问题?

java - 如何使用java正确使用rsa私钥生成签名?

Java - 基于 JMS 的 Web 服务

web-services - 比较和对比 REST 和 SOAP Web 服务?

c# - 重试直到用户输入正确

.net - 无法使用权​​限 '*' 为 SSL/TLS 建立安全通道

c# - 将表(行)与 OpenXML SDK 2.5 一起保存

java - Tomcat、JAX-WS、Hibernate——缺陷和解决方案?

c# - Visual Studio 2013+ 数据库项目 - 部分架构/导入部分数据库项目

c# - node.js 为业务逻辑编写模块 (edge.js)