Call Web Service using proxy and http authentication

Steve Howell showell30 at yahoo.com
Tue May 12 20:38:02 CEST 2009


On May 12, 8:59 am, wdveloper <tot... at gmail.com> wrote:
> Hi everyone,
>
> I am trying to call a webservice which requires an http
> authentication.
> To reach the ws, I must pass from a proxy http. So in the whole I need
> go through two authentications before getting the ws working. I am
> using SOAPpy and I'm getting quite crazy.
> I am able to arrange this problem with simple http calls using urllib2
> but for the ws i dont see any way out.
>
> Does anyone knows how I can manage this stuff? Is there any better
> solution or example code?
>

Your high level description of the problem is good, but I think you'll
get more help if you provide a little more detail.

For something like this you may want to try to do more at the HTTP
level, where you have a little more control over the authentication,
and then find a way to hook into SOAPpy just to build and parse the
payloads.

How good is your understanding of HTTP?  Do you know the basics of how
headers work?  You might want to brush up a little on HTTP just to
help understand what's going on; it will almost certainly be valuable
for future projects as well.

To understand how the proxy works in particular, if you can use the
proxy to access a normal html-serving website, you can use the "Live
HTTP Headers" tool under Firefox to see what's going on.

But before all that, I would maybe just post a little more detail on
the problem.  Maybe show code you've written so far, and any error
messages/tracebacks, to better indicate where you are stuck.




More information about the Python-list mailing list