Configuring a Data Virt resource adapter to handle an F5 redirect

41 views Asked by At

How do I configure the resource adapter and/or the vdb for a url that sits behind an F5? Suppose that my resource adapter and vdb are configured to read data from

https://foo.org/data?cat='pricing'&page=1&rows=20

If this is a direct hostname then Data Virt reads the data correctly. If it is an F5 then I get an ArrayIndexOutOfBoundsException because the InputStream size is zero.

I verified that the authentication configuration works correctly, so it's not authentication-related.

If I curl the above url (when behind F5) then I get a failed 302 and no results. If I curl -L then I get static html error page (generated apparently because the server did not receive the required parameters). If I curl -L -b cookies.txt then I get the expected data. So basically, my challenge it to apply the equivalent of curl -L and -b cookies.txt options to a Data Virt resource adapter and/or vdb.

1

There are 1 answers

0
Ramesh Reddy On

The web services translator directly does not support 302 (redirection), however it uses CXF underneath to make the connections. So, configure cxf configuration file on web service as defined in examples here 1 look at Configuring Https, then add the redirect configuration to this file as described at 2

<http:client AutoRedirect="true" Connection="Keep-Alive"/>

http://teiid.github.io/teiid-documents/master/content/admin/Web_Service_Data_Sources.html http://cxf.apache.org/docs/client-http-transport-including-ssl-support.html