kartagis / pysimplesoap

Automatically exported from code.google.com/p/pysimplesoap
0 stars 0 forks source link

Web2Py SOAP server integration #1

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Attached is a path to add SOAP service support for web2py using this library

It extends Service class with soap decorator and soap_serve method.
See Web2Py for detailed information.

Example:
{{{
service = Service(globals())
@service.soap('MyFunction',returns={'result':int,args={'a':int,'b':int,})
def myfunction(a, b):
    return a + b
def call():
    return service()
}}}

The call it with:
{{{
from pysimplesoap.client import SoapClient
client = SoapClient(
        location = "http://localhost:8000/webservices/sample/call/soap",
        action = 'http://example.com/', # SOAPAction
        namespace = "http://example.com/sample.wsdl", 
        soap_ns='soap', # classic soap 1.1 dialect
        trace = True, # print http/xml request and response
        ns = False) # do not add namespace prefix
response = client.MyFunction(a=1,b=2)
print int(response.result)
}}}

Original issue reported on code.google.com by reingart@gmail.com on 21 Jul 2010 at 3:36

Attachments:

GoogleCodeExporter commented 8 years ago
Live online example at:
https://www.web2py.com.ar/webservices/sample/call/soap

Online Test at:
https://www.web2py.com.ar/webservices/sample/test_soap_sub

Original comment by reingart@gmail.com on 21 Jul 2010 at 4:18

GoogleCodeExporter commented 8 years ago
Moved to web2py:

http://code.google.com/p/web2py/issues/detail?id=85

Original comment by reingart@gmail.com on 27 Jul 2010 at 6:53

GoogleCodeExporter commented 8 years ago
Included with web2py since version #1.82.1

Original comment by reingart@gmail.com on 6 Aug 2010 at 2:18