Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old August 2nd, 2005, 12:15 PM
Odd-R.
Guest
 
Posts: n/a
Default SOAPpy and http authentication

I use the following piece of code to contact a webservice,
and read a wsdl file.

from SOAPpy import WSDL
from SOAPpy import URLopener
url= ' http://someserver/somewebservice
url1 = URLopener.URLopener(username='user',passwd='pass')
server=WSDL.Proxy(url1.open(url))

This yields no errors, and everyting is fine.

However, when I start calling the actual methods of
this webservice, I get this error

SOAPpy.Errors.HTTPError: <HTTPError 401 Unauthorized>

How can I avoid this?

Thanks in advance for all help!

--
Har du et kjøleskap, har du en TV
så har du alt du trenger for å leve

-Jokke & Valentinerne
  #2  
Old August 2nd, 2005, 12:45 PM
Lutz Horn
Guest
 
Posts: n/a
Default Re: SOAPpy and http authentication

On 2005-08-02, Odd-R. <oddr@home.no.no> wrote:[color=blue]
> from SOAPpy import WSDL
> from SOAPpy import URLopener
> url= ' http://someserver/somewebservice
> url1 = URLopener.URLopener(username='user',passwd='pass')
> server=WSDL.Proxy(url1.open(url))[/color]

Is it possible to call WSDL.Proxy with a String? Then you could build
the URL als http://user:pass@someserver/somewebservice. This works
with SOAPpy.SOAPProxy.

Lutz
  #3  
Old August 2nd, 2005, 01:05 PM
Oliver Andrich
Guest
 
Posts: n/a
Default Re: SOAPpy and http authentication

2 Aug 2005 11:38:51 GMT, Lutz Horn <lutz.horn@gmx.de>:[color=blue]
> On 2005-08-02, Odd-R. <oddr@home.no.no> wrote:[color=green]
> > from SOAPpy import WSDL
> > from SOAPpy import URLopener
> > url= ' http://someserver/somewebservice
> > url1 = URLopener.URLopener(username='user',passwd='pass')
> > server=WSDL.Proxy(url1.open(url))[/color]
>
> Is it possible to call WSDL.Proxy with a String? Then you could build
> the URL als http://user:pass@someserver/somewebservice. This works
> with SOAPpy.SOAPProxy.[/color]

Yes, you can actually call it that way, but then the wsdl retrieval is
done using the authentication, but all the service calls are done
without. This is something, that is also puzzling me. So far I can
perfectly live with SOAPProxy, but it would be nice to solve this
puzzle.

Best regards,
Oliver

--
Oliver Andrich <oliver.andrich@gmail.com> --- http://fitheach.de/
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles