Reputation: 733
I am a Python programmer, but new to webservices.
Task:
I have a Typo3-Frontend and a Postgresql-database. I want to write a backend between these two parts in Python. Another developer gave me a wsdl-file and xsd-file to work with, so we use SOAP. The program I code should be bound to a port (TCP/IP) and act as a service. The data/payload will be encoded in json-objects.
Webclient <---> Frontend <---> Backend(Me) <---> Database
My ideas:
Questions:
Thanks in advance!
Steffen
Upvotes: 2
Views: 1457
Reputation: 2724
I have successfully used suds client to communicate with Microsoft Dynamics NAV (former Navision).
Typical session looks like this:
from suds.client import Client
url = 'http://localhost:7080/webservices/WebServiceTestBean?wsdl'
client = Client(url)
By issuing print client
you get the list of types and operations supported by the 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 are exposed as ordinary python functions and you can use ordinary dicts in place of WSDL types.
Upvotes: 3
Reputation: 69
I would go with Twisted since I am working with it anyway and enjoy the system.
Another asynchronous option may be Tornado.
Or a synchronous version with Flask.
I'm sure there are many other options. I would look for a higher level framework like those listed above so you don't have to spend too much time connecting the frontend to the backend.
Upvotes: 1