I'm using Perl 5.22 and CLM 4.0.7 running under WAS 8.8.5.9.
I have a long-running Perl program interrogating RM project areas via OSLC. My problem is that after 8 hours an attempt to retrieve an XML doc via a GET to a URL returns an HTML structure instead, which looks rather like a logon prompt as it includes this:
<script type="text/javascript">
/ <![CDATA[ /
dojo.addOnLoad( function() {
net.jazz.ajax.ui.PlatformUI.createAndRunWorkbench("net.jazz.web.app.authrequired");
});
/ ]]> /
</script>
Interestingly, the structure is not valid XML but that's not really the issue.
I've tried to periodically refresh the login session by this method:
$userAgent->conn_cache(LWP::ConnCache->new());
but the job still fails after 8 hours so clearly that doesn't work. Simply periodically reissuing the intial logon ($$response = $$userAgent->request(POST $jazzConnUri,[j_username=>$jazzuser, j_password=>$jazzpwd]);) doesn't work either, and in fact fails.
I think the answer is to periodically close then reopen the connection, but I can't work out what I need to post to make the close happen. Can anyone help? Or offer a better strategy?