[Soap-Python] SUDS problems

Burak Arslan burak.arslan at arskom.com.tr
Sun Sep 25 22:18:50 CEST 2011


worksforme. does clearing suds cache help?

server:
=================================================


from rpclib.model.complex import ComplexModel
from rpclib.model.primitive import String
from rpclib.service import ServiceBase
from rpclib.application import Application
from rpclib.decorator import rpc
from rpclib.interface.wsdl import Wsdl11
from rpclib.protocol.soap import Soap11
from rpclib.server.wsgi import WsgiApplication
from rpclib.util.wsgi_wrapper import run_twisted

class state_only(ComplexModel):
     state = String

class testt(ServiceBase):
     @rpc(String, String, _returns=state_only)
     def testf(ctx, first, second):
         result = state_only()
         result.state = "test"
         return result

if __name__ == '__main__':
     application = Application([testt], 'tns',
                 interface=Wsdl11(), in_protocol=Soap11(), 
out_protocol=Soap11())
     wsgi_app = WsgiApplication(application)

     print 'listening on 0.0.0.0:7789'
     print 'wsdl is at: http://0.0.0.0:7789/app/?wsdl'

     run_twisted( ( (wsgi_app, "app"),), 7789)

=========================================
client
=========================================

from suds.client import Client

c = Client('http://localhost:7789/app/?wsdl')
print c.service.testf('first', 'second')


On 25.09.2011 16:04, azurIt wrote:
> Hi,
>
> i have problems with SUDS client and rpclib server with very simple usage of complex types:
>
> class state_only(ComplexModel):
> 	state = String
>
> class testt(ServiceBase):
>
> 	@rpc(String, String, _returns=state_only)
> 	def testf(self, first, second):
> 		result = state_only()
> 		result.state = "test"
> 		return result
>
> SUDS result:
> suds.TypeNotFound: Type not found: 's0:state'
>
> I had similar problems with SUDS + Ladon. Is this bug in SUDS ? What other client do you recommend to use ? Thanks.
>
> azurIt
> _______________________________________________
> Soap mailing list
> Soap at python.org
> http://mail.python.org/mailman/listinfo/soap



More information about the Soap mailing list