Xins and redirects

Help
Sergio
2007-05-10
2013-04-26
  • Sergio
    Sergio
    2007-05-10

    Hi all,
    I've a problem... when I call a service and the server responses HTTP 302 (a redirect), the log shows the following log entry (and the subsequent error):
    []-10/05/2007 10:39:30-INFO-Redirect requested but followRedirects is disabled-
    []-10/05/2007 10:39:30-INFO-Finished attempt to call

    Google says thats this is part of http-commons-client, which by default don't allow redirects.

    How can I enable redirect in Xins??
    Thanks

     
    • Hi Sergio,

      XINS uses http-common-client which doesn't follow redirects for POST.
      http://jakarta.apache.org/commons/httpclient/redirects.html

      Something you can try is to use HTTP GET to call your Web Service:
      capi.getXINSCallConfig().setHTTPMethod(org.xins.common.http.HTTPMethod.GET);

      If this doesn't work that's probably because the follow redirects is not enabled per default for GET.
      There is a method setFollowRedirects(boolean) in http-common-client but it's not part of XINSCallConfig at the moment.

      Hope that helps,
      Anthony