i python programmer, new webservices.
task:
i have typo3-frontend , postgresql-database. want write backend between these 2 parts in python. developer gave me wsdl-file , xsd-file work with, use soap. program code should bound port (tcp/ip) , act service. data/payload encoded in json-objects.
webclient <---> frontend <---> backend(me) <---> database my ideas:
- i code functions hand wsdl-file, datatypes xsd.
- i bind service port recieves incoming json-data
- i parse incoming data, database-operations, other stuff
- i return result frontend.
questions:
- do have code methods/functions descripted in wsdl-file hand?
- do have define complex datatypes hand?
- how should implement communication between frontend , backend?
thanks in advance!
steffen
i have used suds client communicate microsoft dynamics nav (former navision).
typical session looks this:
from suds.client import client url = 'http://localhost:7080/webservices/webservicetestbean?wsdl' client = client(url) by issuing print client list of types , operations supported serivce.
suds - version: 0.3.3 build: (beta) r397-20081121 service (webservicetestbeanservice) tns="http://test.server.enterprise.rhq.org/" prefixes (1): ns0 = "http://test.server.enterprise.rhq.org/" ports (1): (soap) methods: addperson(person person, ) echo(xs:string arg0, ) getlist(xs:string str, xs:int length, ) getpercentbodyfat(xs:string name, xs:int height, xs:int weight) getpersonbyname(name name, ) hello() testexceptions() testlistarg(xs:string[] list, ) testvoid() updateperson(anotherperson person, name name, ) types (23): person name phone anotherperson wsdl operations exposed ordinary python functions , can use ordinary dicts in place of wsdl types.
Comments
Post a Comment