How to handle HTTP redirect using SOAPpy

S

Sameer Deshpande

Hi,

I am using python SOAPpy module to call a web service. Call to web
service gets executed successfully. I am facing a problem if the call
to WS results into redirect. I get "HTTPError: <HTTPError 302 Moved
Temporarily>"

If I enable the debug info, I do get the new redirected url. How do I
divert my WS request to new url?

Here is my code
*** Incoming HTTP headers
**********************************************
HTTP/1.? 302 Moved Temporarily
Date: Wed, 28 Dec 2005 14:06:25 GMT
Server: Jetty/5.1.4 (Windows 2000/5.0 x86 java/1.4.2_08
Content-Type: text/xml;charset=ISO-8859-1
Location: http://localhost:8080/VS/SR/wp?method=null
Connection: close
************************************************************************
Traceback (most recent call last):
File "<interactive input>", line 1, in ?
File "C:\PYTHON23\lib\site-packages\SOAPpy\Client.py", line 470, in
__call__
return self.__r_call(*args, **kw)
File "C:\PYTHON23\lib\site-packages\SOAPpy\Client.py", line 492, in
__r_call
self.__hd, self.__ma)
File "C:\PYTHON23\lib\site-packages\SOAPpy\Client.py", line 363, in
__call
config = self.config)
File "C:\PYTHON23\lib\site-packages\SOAPpy\Client.py", line 263, in
call
raise HTTPError(code, msg)
HTTPError: <HTTPError 302 Moved Temporarily>

How do I divert all my requests to new url.

Thanks

Sameer
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,054
Latest member
LucyCarper

Latest Threads

Top