【问题标题】:JAX-RPC webservice redirecting to https automaticallyJAX-RPC webservice 自动重定向到 https
【发布时间】:2014-08-08 10:42:24
【问题描述】:

我已经使用 JAX-RPC 创建了一个 web 服务。调用 web 服务时,会发生 LDAP 身份验证,该身份验证将由 WebSphere 容器处理,然后将重定向回实际的 web 服务。

但是当我看到日志时,它显示了 302 错误,并且 url 更改为 https 而不是 http。

请在这方面帮助我。

web.xml 中的条目如下所示:

<web-resource-collection>
    <web-resource-name>MyService</web-resource-name>
    <description></description>
    <url-pattern>/services/*</url-pattern>          
    <http-method>GET</http-method>
    <http-method>POST</http-method>
    <http-method>HEAD</http-method>
</web-resource-collection>
<auth-constraint>
    <description>Used by Medescription>
    <role-name>BasicUserRole</role-name>
</auth-constraint>

【问题讨论】:

    标签: java web-services websphere jax-rpc


    【解决方案1】:

    如果您的应用程序受到保护,它可能会根据 user-data-constraint 重定向到 https。如果你不想将transport-guarantee 重定向到NONE

    ...  
      <user-data-constraint>
         <transport-guarantee>NONE</transport-guarantee>
      </user-data-constraint>
    </security-constraint>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-02-12
      • 2021-01-29
      • 2019-05-15
      • 1970-01-01
      • 1970-01-01
      • 2017-02-02
      • 2013-08-27
      • 2022-01-22
      相关资源
      最近更新 更多