On Friday, September 11, 2015 at 6:16:31 AM UTC-7, m3tr0 wrote: > > Hi to all, > I'm pretty new to web service and also I'm not a guru of web2py so be > patient :-) > but anyway I've the following problem: > I need to emulate one of the Sharepoint web service or better say one > method of the web service ( web service Lists.asmx method AddAttachment). > I know that web2py supports SOAP service but the documentation in online > book is not enough for me. > What I need is: > -create a web service with name Lists.asmx that has a method that accept 4 > arguments: > listName (String) > listItemID (String) > fileName (String) > file (File) > and returns a string > > Is web2py suitable for such task? If yes could you show me some examples; > if no could you point me to any others python solutions? > > >
The condensed reply, which I used last year: As a newcomer, I found it easy to implement. > > (@service.soap(various args that get used to form the wsdl XML) ) > <URL:https://groups.google.com/d/msg/web2py/2QS16-Q1hWI/9kmoMl8-4-QJ> That implementation looks something like this: @service.soap('LogStatus',returns={'LogResult':int},args={'statstr':str}) def logstat(statstr): "Log Status from client" import datetime now = datetime.datetime.now() result = db.logtable.insert(logtime=now, client=request.client, status= statstr) # various side computations omitted return result (one of the first things I did with web2py, not that I've gotten too much more sophisticated) This post shows using allow_basic_login in a sample function: <URL:https://groups.google.com/d/msg/web2py/dD84bD4W8uA/-4Uue3zw3EoJ> This post discusses a Java client for a service like above: <URL:https://groups.google.com/d/msg/web2py/uBmOROkXs20/iQb_lJvwPCgJ> /dps -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.

