【问题标题】:Axis2 "https is forbidden"Axis2“禁止使用 https”
【发布时间】:2012-12-12 21:11:36
【问题描述】:

我是 SOAP 新手,正在构建我的第一个 Axis2 (v 1.6.2) Web 服务。我从一位同事那里复制了一个小型测试服务,如果我使用 http 而不是 https,它就会运行。我的同事没有这个问题。

我收到的错误是“javax.servlet.ServletException:https 被禁止”。我的 Axis2.xml 文件包含以下内容:

<transportReceiver name="http"  class="org.apache.axis2.transport.http.AxisServletListener">
    <parameter name="port">8080</parameter>
</transportReceiver>

<transportReceiver name="https" class="org.apache.axis2.transport.http.AxisServletListener">
    <parameter name="port">8443</parameter>
</transportReceiver>

我正在测试 localhost、JRE 6.1 和 Tomcat 7.0.25。我的同事(能够使用 https)正在使用 Websphere 6 和 Axis2 v.1.6.0,因此这可能是应用服务器或 Axis2 版本问题。我们不使用 Maven。

我的 Tomcat 端口是 http:8080、https:8443 和 AJP:8009。

任何解决此 https 错误的帮助将不胜感激。

更新:尚无解决方案,但似乎与以下内容相似或相同: https://stackoverflow.com/questions/13808029/http-is-forbidden-exception-while-accessing-the-axis-2-webservice

【问题讨论】:

    标签: https axis2


    【解决方案1】:

    我发现了原因。我的 web.xml 文件中有以下条目,用于 AxisServlet servlet。我的同事也有条目,但她的被注释掉了。此条目导致服务器启动时出现“找不到文件”错误。对此发表评论解决了这个问题。

        <init-param>
            <param-name>axis2.xml.path</param-name>
            <param-value>/WEB-INF/conf/axis2.xml</param-value>
        </init-param>
    

    linuxlewis,感谢您的回复!

    【讨论】:

      【解决方案2】:

      我可以想到两个可能的问题。

      1. 可能位于 Web 服务前面的 IIS/Apache 服务器正在使用某种域限制。使用 mod_authz_host,您可以根据域限制对特定 http 模式的访问

      2. 如果您使用 Java 从服务器访问 Web 服务,则可能需要在 JDK 安全 cacerts 文件中安装与 Web 服务关联的证书。如果您的同事在 websphere 中工作,他们可能已经安装了证书

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2019-05-29
        • 2018-12-10
        • 1970-01-01
        • 1970-01-01
        • 2020-05-30
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多