Access Control Works With Ajax But Does Not Work With Web Service Call

I was using ajax to send request to another webapp and it was working perfectly but I need to do the same with web service call but it redirects to login page and nothing happens and can not pass the access control .

I use eHttpClient(zend) extension for web service call.

Why ajax call and web service call react different for access control ?