<div class="gmail_quote">On Mon, Jun 22, 2009 at 6:45 AM, Jeff Ortel <span dir="ltr"><<a href="mailto:jortel@redhat.com">jortel@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hey Bruce,<br>
<br>
Can you paste the <service/> node from the wsdl?<br>
<br>
-jeff<br>
</blockquote><div><br>Here's the service def node:<br>
<br>
<service name="xxxService"><br>
    <port binding="tns:xxxBinding" name="xxxPort"><br>
      <soap:address location="<a href="https://localhost:8443/service-war/xxx">https://localhost:8443/service-war/xxx</a>"/><br>
    </port><br>
</service><br><br><div>I did get it working. <br><br>This works:<br><br>url = '<a href="https://localhost:8443/service-war/dpmcore?wsdl">https://localhost:8443/service-war/dpmcore?wsdl</a>'<br>
client = Client(url, username="username", password="password")<br>
client.service.getOemKey()<br>
<br>
This does not:<br><br>security = Security()<br>token = UsernameToken('username', 'password')<br>security.tokens.append(token)<br>url = '<a href="https://kaan-01.wlv.lsi.com:8443/service-war/dpmcore?wsdl">https://kaan-01.wlv.lsi.com:8443/service-war/dpmcore?wsdl</a>'<br>
client = Client(url, wsse=security)<br>client.service.getOemKey()<br><br>I was making it harder than it needed to be. What is the difference is between these above two client authentication mechanisms? <br>Will either one of these support digest passwords some time in the future?<br>
<br>One last somewhat off-topic question, (for today anyway) Is there a way to easily obfuscate the userid/passwd in code? <br>Can we use suds with  ssl certs and something like an authorized keys file?<br><br>Thanks<br><br>
</div><div>-Bruce<br></div><br><br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
Edge, Bruce wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im">
If that was the problem wouldn't the client instantiation fail?<br>
I'm able to inatantiate a client and do a:<br>
      print client.service<br>
But then any methods called on the service fail.<br>
<br>
-Bruce<br>
<br>
Sent from my iPhone<br>
<br></div><div class="im">
On Jun 20, 2009, at 8:46 AM, David Norton <<a href="mailto:david@nortoncrew.com" target="_blank">david@nortoncrew.com</a> <mailto:<a href="mailto:david@nortoncrew.com" target="_blank">david@nortoncrew.com</a>>> wrote:<br>

<br>
</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im">
Hello Bruce,<br>
<br>
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":<br>
<br>
client = Client(url+"?wsdl")<br>
client.wsdl.service.setlocation(url)<br>
<br>
Best,<br>
David Norton<br>
<br>
On Jun 19, 2009, at 8:02 PM, Bruce Edge wrote:<br>
<br>
</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im">
I'm having a problem with https basic authentication<br>
<br>
Is there something I'm doing wrong here?<br>
<br>
security = Security()<br>
token = UsernameToken('username', 'password')<br>
security.tokens.append(token)<br></div>
url = ' <<a href="https://targetboc:8443/service-war/dpmcore?wsdl" target="_blank">https://targetboc:8443/service-war/dpmcore?wsdl</a>><a href="https://targetboc:8443/service-war/dpmcore?wsdl" target="_blank">https://targetboc:8443/service-war/dpmcore?wsdl</a>'<div>
<div></div><div class="h5"><br>
c = Client(url, wsse=security)<br>
print c.service<br>
<br>
# OK so far<br>
<br>
c.service.getOemKey(wsse=security)<br>
<br>
# fails with<br>
<br>
Traceback (most recent call last):<br>
  File "<input>", line 1, in <module><br>
  File "wsenv.py", line 22, in <module><br>
    c.service.getOemKey(wsse=security)<br>
  File "suds/client.py", line 240, in __call__<br>
    return target.call(*args, **kwargs)<br>
  File "suds/client.py", line 379, in call<br>
    return method(*args, **kwargs)<br>
  File "suds/client.py", line 240, in __call__<br>
    return target.call(*args, **kwargs)<br>
  File "suds/client.py", line 422, in call<br>
    return client.invoke(args, kwargs)<br>
  File "suds/client.py", line 480, in invoke<br>
    result = self.send(msg)<br>
  File "suds/client.py", line 504, in send<br>
    reply = transport.send(request)<br>
  File "suds/transport/https.py", line 64, in send<br>
    return HttpTransport.send(self, request)<br>
  File "suds/transport/http.py", line 78, in send<br>
    fp = self.__open(u2request)<br>
  File "suds/transport/http.py", line 99, in __open<br>
    return self.urlopener.open(u2request)<br>
  File "/usr/lib/python2.6/urllib2.py", line 383, in open<br>
    response = self._open(req, data)<br>
  File "/usr/lib/python2.6/urllib2.py", line 401, in _open<br>
    '_open', req)<br>
  File "/usr/lib/python2.6/urllib2.py", line 361, in _call_chain<br>
    result = func(*args)<br>
  File "/usr/lib/python2.6/urllib2.py", line 1138, in https_open<br>
    return self.do_open(httplib.HTTPSConnection, req)<br>
  File "/usr/lib/python2.6/urllib2.py", line 1105, in do_open<br>
    raise URLError(err)<br>
URLError: <urlopen error [Errno 111] Connection refused><br>
>>><br>
<br>
I tried the beta with the same result.<br>
<br>
I know the service is OK because I can do this:<br>
<br></div></div>
 curl -ku username:password <<a href="https://localhost:8443/service-war/dpmcore/getOemKey" target="_blank">https://localhost:8443/service-war/dpmcore/getOemKey</a>><a href="https://localhost:8443/service-war/dpmcore/getOemKey" target="_blank">https://localhost:8443/service-war/dpmcore/getOemKey</a><br>

<soap:Envelope xmlns:soap=" <<a href="http://schemas.xmlsoap.org/soap/envelope/" target="_blank">http://schemas.xmlsoap.org/soap/envelope/</a>><a href="http://schemas.xmlsoap.org/soap/envelope/" target="_blank">http://schemas.xmlsoap.org/soap/envelope/</a>"><soap:Body><getOemKeyResponse xmlns=" <<a href="http://lsi.com/dpm/core/types" target="_blank">http://lsi.com/dpm/core/types</a>><a href="http://lsi.com/dpm/core/types" target="_blank">http://lsi.com/dpm/core/types</a>" xmlns:ns2=" <<a href="http://lsi.com/dpm/types" target="_blank">http://lsi.com/dpm/types</a>><a href="http://lsi.com/dpm/types" target="_blank">http://lsi.com/dpm/types</a>"><oemKey>LSI</oemKey></getOemKeyResponse></soap:Body></soap:Envelope> <br>
<div class="im">
<br>
<br>
Thanks, Bruce<br>
_______________________________________________<br>
fedora-suds-list mailing list<br></div>
<mailto:<a href="mailto:fedora-suds-list@redhat.com" target="_blank">fedora-suds-list@redhat.com</a>><a href="mailto:fedora-suds-list@redhat.com" target="_blank">fedora-suds-list@redhat.com</a> <mailto:<a href="mailto:fedora-suds-list@redhat.com" target="_blank">fedora-suds-list@redhat.com</a>><div class="im">
<br>
<a href="https://www.redhat.com/mailman/listinfo/fedora-suds-list" target="_blank">https://www.redhat.com/mailman/listinfo/fedora-suds-list</a><br>
</div></blockquote>
<br>
</blockquote>
<br>
------------------------------------------------------------------------<div class="im"><br>
<br>
_______________________________________________<br>
fedora-suds-list mailing list<br>
<a href="mailto:fedora-suds-list@redhat.com" target="_blank">fedora-suds-list@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/fedora-suds-list" target="_blank">https://www.redhat.com/mailman/listinfo/fedora-suds-list</a><br>
</div></blockquote><div><div></div><div class="h5">
<br>
_______________________________________________<br>
fedora-suds-list mailing list<br>
<a href="mailto:fedora-suds-list@redhat.com" target="_blank">fedora-suds-list@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/fedora-suds-list" target="_blank">https://www.redhat.com/mailman/listinfo/fedora-suds-list</a><br>
</div></div></blockquote></div><br>