[Fedora-suds-list] https authentication failing
Jeff Ortel
jortel at redhat.com
Mon Jun 22 13:45:28 UTC 2009
Hey Bruce,
Can you paste the <service/> node from the wsdl?
-jeff
Edge, Bruce wrote:
> If that was the problem wouldn't the client instantiation fail?
> I'm able to inatantiate a client and do a:
> print client.service
> But then any methods called on the service fail.
>
> -Bruce
>
> Sent from my iPhone
>
> On Jun 20, 2009, at 8:46 AM, David Norton <david at nortoncrew.com
> <mailto:david at nortoncrew.com>> wrote:
>
>> 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 Norton
>>
>> On 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>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>https://localhost:8443/service-war/dpmcore/getOemKey
>>> <soap:Envelope xmlns:soap="
>>> <http://schemas.xmlsoap.org/soap/envelope/>http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><getOemKeyResponse
>>> xmlns=" <http://lsi.com/dpm/core/types>http://lsi.com/dpm/core/types"
>>> xmlns:ns2="
>>> <http://lsi.com/dpm/types>http://lsi.com/dpm/types"><oemKey>LSI</oemKey></getOemKeyResponse></soap:Body></soap:Envelope>
>>>
>>>
>>>
>>> Thanks, Bruce
>>> _______________________________________________
>>> fedora-suds-list mailing list
>>> <mailto:fedora-suds-list at redhat.com>fedora-suds-list at redhat.com
>>> <mailto:fedora-suds-list at redhat.com>
>>> https://www.redhat.com/mailman/listinfo/fedora-suds-list
>>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> fedora-suds-list mailing list
> fedora-suds-list at redhat.com
> https://www.redhat.com/mailman/listinfo/fedora-suds-list
More information about the fedora-suds-list
mailing list