JAX-RPC Web服务自动重定向到https

时间:2014-08-08 10:42:25

标签: java web-services websphere jax-rpc

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

但是当我看到日志时,它显示302错误,并且网址更改为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>

1 个答案:

答案 0 :(得分:0)

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

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