简体   繁体   中英

JAX-RPC webservice redirecting to https automatically

I have created a webservice using JAX-RPC. When the webservice is invoked, an LDAP authentication occurs which will be handled by WebSphere container and then it will be redirected back to the actual webserivce.

But when I see the logs, it shows a 302 error and the url is changed to https instead of http.

Please help me out in this regard.

The entry in the web.xml looks like this:

<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>

If your application is protected it might get redirected to https based on user-data-constraint . If you don't want to redirect set transport-guarantee to NONE .

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM