Re: Call Web Service using proxy and http authentication
- From: Steve Howell <showell30@xxxxxxxxx>
- Date: Wed, 13 May 2009 08:26:38 -0700 (PDT)
On May 12, 12:51 pm, wdveloper <tot...@xxxxxxxxx> wrote:
On May 12, 8:38 pm, Steve Howell <showel...@xxxxxxxxx> wrote:
On May 12, 8:59 am, wdveloper <tot...@xxxxxxxxx> 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.
Thank you very much Steve,
I do have a good understanding of http and its headers rules, and of
course I can work on that.
On the other hand, I am new to python and SOAPpy toolkit and I dont
have much of an experience working with ws in general.
When it comes of working with simple call to WS, everything is
successfull; problems start cause I dont know how to use the toolkit
to compose the http request. I should code it in the way that it
connects to my proper proxy and it gets authenticated in the server
exposing the service.
What I have is something like:
from SOAPpy import WSDL
wsdl = 'http://myws?wsdl'
my_http_proxy = '10.x.x.x:8080'
proxy = WSDL.Proxy(wsdl, http_proxy=my_http_proxy)
res = proxy.myService( myparam='...' )
What I get is that connection reaches timeout since the server doesnt
see me coming from the right proxy.
First problem, I can't see where I can put my proxy authentication
username and password.
Second, when I will be able to pass through the right proxy, I need to
authenticate on the server via http through my credential.
Have you looked at the URLopener class?
.
- Follow-Ups:
- Re: Call Web Service using proxy and http authentication
- From: wdveloper
- Re: Call Web Service using proxy and http authentication
- References:
- Call Web Service using proxy and http authentication
- From: wdveloper
- Re: Call Web Service using proxy and http authentication
- From: Steve Howell
- Re: Call Web Service using proxy and http authentication
- From: wdveloper
- Call Web Service using proxy and http authentication
- Prev by Date: nike clothing,nike shoes,online store,http://www.maidi2008.com air Jordan Shoes,Nike Air Jordans, Air Force Ones,Retro Air Jordan, Bape Hoodies,Bape shoes-Tencent Traveler|Jordan Shoes,Nike Air Jordans, Air Force Ones,Retro Air Jordan, Bape Hood
- Next by Date: Can't run PyQt apps with MacPython
- Previous by thread: Re: Call Web Service using proxy and http authentication
- Next by thread: Re: Call Web Service using proxy and http authentication
- Index(es):
Relevant Pages
|