Hey William,
Welcome to suds!
Without more information it's kind of hard to say what really going on.
But, my guess it that this server isn't doing the challenge & response handshaking
defined
for basic http authentication as defined in RFC-2617. See:
http://en.wikipedia.org/wiki/Basic_access_authentication. By default, suds uses the http
authentication provided by urllib2 which expects the server to request credentials by
returning an http 401 code per the specification.
I've heard of servers that don't follow this model so I've added a 2nd
transport that
simply sends the http header (credentials) on every request and updated the
documentation.
https://fedorahosted.org/suds/wiki/Documentation#HTTPAUTHENTICATION
You'll need r537 (0.3.7 beta) to get the new transport.
I'd suggest you give it a try. You can do something like this:
from suds.client import Client
from suds.transport.http import HttpAuthenticated
t = HttpAuthenticated(username='elmer', password='fudd')
client = Client(url, transport=t)
Hope this helps,
Jeff
William R. Dickson wrote:
Please forgive me if this is an incredibly stupid question --
I've been
unexpectedly thrown into a situation where I need to modify some python
scripts that currently connect to a CommuniGAte Pro server so that they
can instead interact with
everyone.net using SOAP...and I don't know
SOAP yet.
I'm trying to start simple, just making sure I can authenticate and
retrieve data. My understanding of the docs tells me this should work:
import suds
wsdl_file = 'file:///Users/wrd/Desktop/everyone_net/xrc.wsdl'
client = suds.client.Client(wsdl_file, username='xxxxxxxx',
password='yyyyyyyy')
print client.service.listClientIDsOfDistributor()
However, it instead produces an authentication error:
suds.WebFault: Server raised fault: 'net.everyone.xrc.XRCException:
XRCException Code [5] Missing username (clientID) or password, perhaps
you are not using HTTP authentication.'
everyone.net provided some sample perl code, and I've tested that
successfully; it looks like so:
my $USERNAME = "xxxxxxxx";
my $PASSWORD = "yyyyyyyy";
my $client = SOAP::Lite
->uri("urn:xrc.ws.everyone.net")
->proxy("https://" . $USERNAME . ":" . $PASSWORD .
"\(a)ws.everyone.net/ws/services/xrc");
I think I must be missing something very simple; any suggestions would
be greatly appreciated.
Thanks,
-Bill
_______________________________________________
fedora-suds-list mailing list
fedora-suds-list(a)redhat.com
https://www.redhat.com/mailman/listinfo/fedora-suds-list