title: Python soap using soaplib (server) and suds (client)
body: <p>This question is related to:
  <a href="https://stackoverflow.com/questions/1751027/python-soap-server-client">Python SOAP server / client</a></p>
  
  <p>In the case of soap with python, there are recommendation to use soaplib (<a href="http://wiki.github.com/jkp/soaplib" rel="nofollow noreferrer">http://wiki.github.com/jkp/soaplib</a>) as soap server and suds (<a href="https://fedorahosted.org/suds/" rel="nofollow noreferrer">https://fedorahosted.org/suds/</a>) as soap client.
  My target is to create soap services in python that can be consumed by several clients (java, etc).
  I tried the HelloWorld example from soaplib (<a href="http://trac.optio.webfactional.com/wiki/HelloWorld" rel="nofollow noreferrer">http://trac.optio.webfactional.com/wiki/HelloWorld</a>).
  It works well when the client is also using soaplib.</p>
  
  <p>Then, I tried to use suds as client consuming the HelloWorld services and it fail.
  -Why this is happening? Does soaplib server has problems to consumed by different clients?</p>
  
  <p>Here the code for the server:</p>
  
  <pre><code>from soaplib.wsgi_soap import SimpleWSGISoapApp
  from soaplib.service import soapmethod
  from soaplib.serializers.primitive import String, Integer, Arraycode
  class HelloWorldService(SimpleWSGISoapApp):
  @soapmethod(String,Integer,_returns=Array(String))
  def say_hello(self,name,times):
      results = []
      for i in range(0,times):
          results.append('Hello, %s'%name)
      return results
  
  if __name__=='__main__':
  from cherrypy.wsgiserver import CherryPyWSGIServer
  #from cherrypy._cpwsgiserver import CherryPyWSGIServer
  # this example uses CherryPy2.2, use cherrypy.wsgiserver.CherryPyWSGIServer for CherryPy 3.0
  server = CherryPyWSGIServer(('localhost',7789),HelloWorldService())
  server.start()
  </code></pre>
  
  <p>This is the soaplib client:</p>
  
  <pre><code>from soaplib.client import make_service_client
  from SoapServerTest_1 import HelloWorldService
  client = make_service_client('http://localhost:7789/',HelloWorldService())
  print client.say_hello("Dave",5)
  </code></pre>
  
  <p>Results:</p>
  
  <pre><code>&gt;&gt;&gt; ['Hello, Dave', 'Hello, Dave', 'Hello, Dave', 'Hello, Dave', 'Hello, Dave']
  </code></pre>
  
  <p>This is the suds client:</p>
  
  <pre><code>from suds.client import Client
  url = 'http://localhost:7789/HelloWordService?wsdl'
  client1 = Client(url)
  client1.service.say_hello("Dave",5)
  </code></pre>
  
  <p>Results:</p>
  
  <pre><code>    &gt;&gt;&gt; Unhandled exception while debugging...
  Traceback (most recent call last):
    File "C:\Python25\Lib\site-packages\RTEP\Sequencing\SoapClientTest_1.py", line 10, in &lt;module&gt;
      client1.service.say_hello("Dave",5)
    File "c:\python25\lib\site-packages\suds\client.py", line 537, in __call__
      return client.invoke(args, kwargs)
    File "c:\python25\lib\site-packages\suds\client.py", line 597, in invoke
      result = self.send(msg)
    File "c:\python25\lib\site-packages\suds\client.py", line 626, in send
      result = self.succeeded(binding, reply.message)
    File "c:\python25\lib\site-packages\suds\client.py", line 658, in succeeded
      r, p = binding.get_reply(self.method, reply)
    File "c:\python25\lib\site-packages\suds\bindings\binding.py", line 158, in get_reply
      result = unmarshaller.process(nodes[0], resolved)
    File "c:\python25\lib\site-packages\suds\umx\typed.py", line 66, in process
      return Core.process(self, content)
    File "c:\python25\lib\site-packages\suds\umx\core.py", line 48, in process
      return self.append(content)
    File "c:\python25\lib\site-packages\suds\umx\core.py", line 63, in append
      self.append_children(content)
    File "c:\python25\lib\site-packages\suds\umx\core.py", line 140, in append_children
      cval = self.append(cont)
    File "c:\python25\lib\site-packages\suds\umx\core.py", line 61, in append
      self.start(content)
    File "c:\python25\lib\site-packages\suds\umx\typed.py", line 77, in start
      found = self.resolver.find(content.node)
    File "c:\python25\lib\site-packages\suds\resolver.py", line 341, in find
      frame = Frame(result, resolved=known, ancestry=ancestry)
    File "c:\python25\lib\site-packages\suds\resolver.py", line 473, in __init__
      resolved = type.resolve()
    File "c:\python25\lib\site-packages\suds\xsd\sxbasic.py", line 63, in resolve
      raise TypeNotFound(qref)
  TypeNotFound: Type not found: '(string, HelloWorldService.HelloWorldService, )'
  </code></pre>