I'm trying to use SOAPpy to create a python web service for my program.
(using last released of SOAPpy)
OS : Gentoo (Linux)
my server files are all located in /opt/program/ directory
my server.py file create the object needed to launch the web service and finished with :
test = program()
print "<activation Soap>"
server = SOAPpy.SOAPServer((IP, PORT))
print "\n……………… READY ON ", IP, " : ", str(PORT)
in my shell window, i open python and do the following :
client = SOAPpy.SOAPProxy(IP + ":" + str(PORT))
And when i try it, i got the following messages :
>>print client.start_prog(param1, param2, param3)
>>welcome to program.
>>print client.ask(param1, param2)
So it's finally working
Then, to share my webservice with another person, i was asked to give a WSDL file.
As it seems there is no way to generate WSDL file for python web services, i had to write it by myself.
And to test my WSDL file, i did the following in python command line:
wsdl_url = "http://www.mywebsite.com/mywsdlfile.wsdl"
client = SOAPpy.WSDL.Proxy(wsdl_url)
and made the same tests as above and it worked fine.
Then i was told that the webservice wasn't working… So what's going on now ?
using the following : http://www.soapclient.com/soaptest.html
and same thing with STORM (open source to test wsdl files) : http://www.codeplex.com/storm
i tryied to test again my wsdl file and get a code 500 error.
After investigating, it looks like there are some authorization access to the path where the webservice is running…
and didn't manage to solve that.
But i tryed something else :
using a python script (located in cgi-bin folder), and changing my WSDL location attribute to this script now, i managed to read what wsdl was sending and to get the answer back and it's a well formed XML.
And "Storm" returned the right value of my test except that my "content-length" is said to be equal to "-1" (which means Null for the one who is using my wsdl file to access my webservice)
So here is my problem…. how should i arrange all my files to get something working fine, give the wsdl file to anyone who want to use my webservice and let him work with it ?
Any help ?
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.