SOAP Lite, LWP and mod_perl
- I just ran into a strange problem with SOAP::Lite and LWP. It appears
to me, for a given mod_perl enabled apache process ,after serving some
cgi code that make use of SOAP::Lite, any consequence cgi call which
make use of LWP would find the setting of requests_redirectable being
ignored, all redirect call will start to be handled internally.
To demonstrate the problem, I have perpared 2 perl scripts (both are
lwpclient.perl - it use LWP to open the url http://www.yahoo.com.hk
(which return a 302 to hk.yahoo.com), and print out some info about the
result of the call
soapclient.perl - copied this from soaplist document, it use soap to
call http://www.xmethods.net/sd/StockQuoteService.wsdl and print out the
stock quote of msft
To see the problem, copy the script to a mod_perl enabled directory, and
start apache with httpd -X
1) call lwpclient.perl
- which should return the following.
result is 302 : 1
The document has moved here.
2) next call soapclient.perl
- you should get a value
3) last call lwpclient.perl again
- This time you will get
result is 302 :
(follow with the landing page of hk.yahoo.com)
In case it is helpful, here's the config of my testing machine.