title: python-qpid-proton examples, send message to azure not working
body: <p>I'm trying to use python-qpid-proton version 0.9.1 to send a message to a Azure Service Bus queue.</p>
  
  <p>The examples in <code>examples/python/messenger/</code> accept addresses of the form <code>amqps://&lt;user&gt;:&lt;password&gt;@&lt;server&gt;/&lt;queue name&gt;</code>, and I can successfully send messages to the queue I have on Azure with it. The problem with this is that I can't control much of what's going on, namely I can't really see if the sending failed. Eventually I want to persist the messages in case the internet connection goes down temporarily.</p>
  
  <p>The example code <code>examples/python/db_send.py</code> and <code>examples/python/simple_send.py</code> seem to be more useful with this aspects, as they use the <code>MessagingHandler</code> instead of the <code>Messenger</code> class. But when I run them, I get this error:</p>
  
  <pre><code>./simple_send.py -a amqps://send:mxirestofmypassword@testsoton.servicebus.windows.net/queue2
  Traceback (most recent call last):
    File "./simple_send.py", line 62, in &lt;module&gt;
      Container(Send(opts.address, opts.messages)).run()
    File "/usr/local/lib/python2.7/dist-packages/proton/reactor.py", line 120, in run
      while self.process(): pass
    File "/usr/local/lib/python2.7/dist-packages/proton/reactor.py", line 143, in proce
      self._check_errors()
    File "/usr/local/lib/python2.7/dist-packages/proton/__init__.py", line 3737, in dis
      ev.dispatch(self.handler)
    File "/usr/local/lib/python2.7/dist-packages/proton/__init__.py", line 3662, in dis
      result = dispatch(handler, type.method, self)
    File "/usr/local/lib/python2.7/dist-packages/proton/__init__.py", line 3551, in dis
      return m(*args)
    File "/usr/local/lib/python2.7/dist-packages/proton/handlers.py", line 416, in on_r
      self.on_start(event)
    File "./simple_send.py", line 36, in on_start
      event.container.create_sender(self.url)
    File "/usr/local/lib/python2.7/dist-packages/proton/reactor.py", line 671, in creat
      session = self._get_session(context)
    File "/usr/local/lib/python2.7/dist-packages/proton/reactor.py", line 634, in _get_
      return self._get_session(self.connect(url=context))
    File "/usr/local/lib/python2.7/dist-packages/proton/reactor.py", line 611, in conne
      if url: connector.address = Urls([url])
    File "/usr/local/lib/python2.7/dist-packages/proton/reactor.py", line 555, in __ini
      self.values = [Url(v) for v in values]
    File "/usr/local/lib/python2.7/dist-packages/proton/__init__.py", line 3851, in __i
      if defaults: self.defaults()
    File "/usr/local/lib/python2.7/dist-packages/proton/__init__.py", line 3894, in def
      self.port = self.port or self.Port(self.scheme)
    File "/usr/local/lib/python2.7/dist-packages/proton/__init__.py", line 3868, in _ge
      return portstr and Url.Port(portstr)
    File "/usr/local/lib/python2.7/dist-packages/proton/__init__.py", line 3812, in __n
      port = super(Url.Port, cls).__new__(cls, cls._port_int(value))
    File "/usr/local/lib/python2.7/dist-packages/proton/__init__.py", line 3833, in _po
      raise ValueError("Not a valid port number or service name: '%s'" % value)
  ValueError: Not a valid port number or service name: 'mxitheresto'
  </code></pre>
  
  <p>Seems to me like it does not parse the address correctly. I pasted the same address as before. And I also pasted it into the python interpreter, like this:</p>
  
  <pre><code>&gt;&gt;&gt; import proton
  &gt;&gt;&gt; u = proton.Url("amqps://send:mxirestofmypassword@testsoton.servicebus.windows.net/queue2")
  &gt;&gt;&gt; # no error, and I can access all the parameters:
  &gt;&gt;&gt; u.port
  5671
  &gt;&gt;&gt; u.username
  send
  &gt;&gt;&gt; # ...
  </code></pre>
  
  <p>It works fine if I use a local connection with no username and password. Gets past this point if I don't use any username and password but obviously does not work as it fails authentication.</p>
  
  <p>Is there any way I can use the <code>MessagingHandler</code> class and specify username and password to send messages to a remote (like on Azure)?</p>