735
Comentário:
|
755
|
Deleções são marcadas assim. | Adições são marcadas assim. |
Linha 6: | Linha 6: |
#!python | |
Linha 27: | Linha 28: |
#!python |
Neste exemplo foi utilizado o SOAPpy.
Servidor
1 #!/usr/bin/env python
2 # -*- coding: iso-8859-1 -*-
3 import sys
4 import os
5 import base64
6
7 from SOAPpy import *
8
9 def upload_file(file, name):
10 out = open(name,'wb')
11 out.write(str(base64.decodestring(file)))
12 out.close()
13
14 server = SOAPServer(('localhost',8080))
15 server.registerFunction(upload_file)
16 server.serve_forever()
Cliente