I have a clue as to why the client instantiation works but the method calls fail.
If I instantiate the client using the external IP it works:
client = Client('https://kaan-01.wlv.lsi.com:8443/service-war/dpmcore?wsdl', wsse=security)
However if I use the localhost addr, it fails: (see after trace for possible explanation)
Hello Bruce,Does the WSDL specify a different URL for the service? I have had to use the following code because the WSDLs I'm using specify "localhost:8080":client = Client(url+"?wsdl")client.wsdl.service.setlocation(url)Best,David NortonOn Jun 19, 2009, at 8:02 PM, Bruce Edge wrote:_______________________________________________I'm having a problem with https basic authentication
Is there something I'm doing wrong here?
security = Security()
token = UsernameToken('username', 'password')
security.tokens.append(token)
url = 'https://targetboc:8443/service-war/dpmcore?wsdl'
c = Client(url, wsse=security)
print c.service
# OK so far
c.service.getOemKey(wsse=security)
# fails with
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "wsenv.py", line 22, in <module>
c.service.getOemKey(wsse=security)
File "suds/client.py", line 240, in __call__
return target.call(*args, **kwargs)
File "suds/client.py", line 379, in call
return method(*args, **kwargs)
File "suds/client.py", line 240, in __call__
return target.call(*args, **kwargs)
File "suds/client.py", line 422, in call
return client.invoke(args, kwargs)
File "suds/client.py", line 480, in invoke
result = self.send(msg)
File "suds/client.py", line 504, in send
reply = transport.send(request)
File "suds/transport/https.py", line 64, in send
return HttpTransport.send(self, request)
File "suds/transport/http.py", line 78, in send
fp = self.__open(u2request)
File "suds/transport/http.py", line 99, in __open
return self.urlopener.open(u2request)
File "/usr/lib/python2.6/urllib2.py", line 383, in open
response = self._open(req, data)
File "/usr/lib/python2.6/urllib2.py", line 401, in _open
'_open', req)
File "/usr/lib/python2.6/urllib2.py", line 361, in _call_chain
result = func(*args)
File "/usr/lib/python2.6/urllib2.py", line 1138, in https_open
return self.do_open(httplib.HTTPSConnection, req)
File "/usr/lib/python2.6/urllib2.py", line 1105, in do_open
raise URLError(err)
URLError: <urlopen error [Errno 111] Connection refused>
>>>
I tried the beta with the same result.
I know the service is OK because I can do this:
curl -ku username:password https://localhost:8443/service-war/dpmcore/getOemKey
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><getOemKeyResponse xmlns="http://lsi.com/dpm/core/types" xmlns:ns2="http://lsi.com/dpm/types"><oemKey>LSI</oemKey></getOemKeyResponse></soap:Body></soap:Envelope>
Thanks, Bruce
fedora-suds-list mailing list
fedora-suds-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-suds-list