【问题标题】:How to connect to Cisco Show and Share API from Java app如何从 Java 应用程序连接到 Cisco Show and Share API
【发布时间】:2013-10-04 14:23:52
【问题描述】:

我可以通过 Firefox 的 RESTClient 连接到 API,但不能通过我的 java 应用程序。

HttpURLConnection conn = (HttpURLConnection) url.openConnection();
        conn.setRequestMethod("POST");
        conn.setRequestProperty("Content-Type", "application/xml");

另外,url = https://<myCompany:myPort>/vportal/services/xml/api

所有变量都与我在 RESTClient 中使用的匹配,但我不断收到 HTTP error code: 500

有人知道我为什么无法连接吗?谢谢。

【问题讨论】:

    标签: java rest firefox firefox-addon httpurlconnection


    【解决方案1】:

    防火墙阻止了我在虚拟机和云服务器之间的连接。我在本地机器上通过 Firefox 连接到 APY,并在 VM 上使用该应用程序。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2023-04-03
      • 1970-01-01
      • 2021-06-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多