You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
(47) |
Apr
(48) |
May
(68) |
Jun
(9) |
Jul
(43) |
Aug
(10) |
Sep
(81) |
Oct
(43) |
Nov
(22) |
Dec
(60) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(44) |
Feb
(48) |
Mar
(53) |
Apr
(40) |
May
(107) |
Jun
(28) |
Jul
(8) |
Aug
(8) |
Sep
(28) |
Oct
(32) |
Nov
(43) |
Dec
(13) |
2005 |
Jan
(45) |
Feb
(110) |
Mar
(36) |
Apr
(14) |
May
(28) |
Jun
(3) |
Jul
(10) |
Aug
(8) |
Sep
(27) |
Oct
(13) |
Nov
(3) |
Dec
(20) |
2006 |
Jan
(32) |
Feb
(29) |
Mar
(17) |
Apr
(21) |
May
(38) |
Jun
(14) |
Jul
(6) |
Aug
(2) |
Sep
(4) |
Oct
(36) |
Nov
(11) |
Dec
(10) |
2007 |
Jan
(41) |
Feb
(10) |
Mar
(7) |
Apr
(7) |
May
(10) |
Jun
(15) |
Jul
(11) |
Aug
(1) |
Sep
(3) |
Oct
(13) |
Nov
(16) |
Dec
(1) |
2008 |
Jan
(9) |
Feb
(1) |
Mar
|
Apr
|
May
(22) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
(1) |
Dec
(7) |
2009 |
Jan
(3) |
Feb
(1) |
Mar
(3) |
Apr
(6) |
May
(3) |
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2010 |
Jan
|
Feb
|
Mar
(3) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(2) |
Dec
(1) |
2012 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <bov...@us...> - 2007-11-01 22:02:07
|
Revision: 1430 http://pywebsvcs.svn.sourceforge.net/pywebsvcs/?rev=1430&view=rev Author: boverhof Date: 2007-11-01 15:02:12 -0700 (Thu, 01 Nov 2007) Log Message: ----------- _M zsi/ZSI change svn:externals Property Changed: ---------------- tags/ZSI-v2_1_0a1/zsi/ZSI/ Property changes on: tags/ZSI-v2_1_0a1/zsi/ZSI ___________________________________________________________________ Name: svn:externals - wstools https://pywebsvcs.svn.sourceforge.net/svnroot/pywebsvcs/trunk/wstools + wstools/ https://pywebsvcs.svn.sourceforge.net/svnroot/pywebsvcs/tags/ZSI-v2_1_0a1/wstools This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bov...@us...> - 2007-11-01 21:32:20
|
Revision: 1429 http://pywebsvcs.svn.sourceforge.net/pywebsvcs/?rev=1429&view=rev Author: boverhof Date: 2007-11-01 14:32:25 -0700 (Thu, 01 Nov 2007) Log Message: ----------- A https://pywebsvcs.svn.sourceforge.net/svnroot/pywebsvcs/tags/ZSI-v2_1_0a1/wstools copy over from trunk Added Paths: ----------- tags/ZSI-v2_1_0a1/wstools/ Copied: tags/ZSI-v2_1_0a1/wstools (from rev 1428, trunk/wstools) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bov...@us...> - 2007-11-01 21:31:56
|
Revision: 1428 http://pywebsvcs.svn.sourceforge.net/pywebsvcs/?rev=1428&view=rev Author: boverhof Date: 2007-11-01 14:32:00 -0700 (Thu, 01 Nov 2007) Log Message: ----------- A https://pywebsvcs.svn.sourceforge.net/svnroot/pywebsvcs/tags/ZSI-v2_1_0a1/zsi copy over Added Paths: ----------- tags/ZSI-v2_1_0a1/zsi/ Copied: tags/ZSI-v2_1_0a1/zsi (from rev 1427, trunk/zsi) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bov...@us...> - 2007-11-01 21:30:07
|
Revision: 1426 http://pywebsvcs.svn.sourceforge.net/pywebsvcs/?rev=1426&view=rev Author: boverhof Date: 2007-11-01 14:30:11 -0700 (Thu, 01 Nov 2007) Log Message: ----------- A https://pywebsvcs.svn.sourceforge.net/svnroot/pywebsvcs/tags/ZSI-v2_1_0a1 2.1 a1 release Added Paths: ----------- tags/ZSI-v2_1_0a1/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bov...@us...> - 2007-11-01 21:24:30
|
Revision: 1425 http://pywebsvcs.svn.sourceforge.net/pywebsvcs/?rev=1425&view=rev Author: boverhof Date: 2007-11-01 14:24:34 -0700 (Thu, 01 Nov 2007) Log Message: ----------- M RELEASE update these directions Modified Paths: -------------- trunk/zsi/RELEASE Modified: trunk/zsi/RELEASE =================================================================== --- trunk/zsi/RELEASE 2007-11-01 21:06:59 UTC (rev 1424) +++ trunk/zsi/RELEASE 2007-11-01 21:24:34 UTC (rev 1425) @@ -47,13 +47,19 @@ For example: - svn co https://svn.sourceforge.net/svnroot/pywebsvcs - svn mkdir https://svn.sourceforge.net/svnroot/pywebsvcs/tags/ZSI_v2_0_0RC3 - cd pywebsvcs - svn copy trunk/zsi tags/ZSI_v2_0_0RC3/zsi - svn copy trunk/wstools tags/ZSI_v2_0_0RC3/wstools - svn commit + % svn mkdir https://svn.sourceforge.net/svnroot/pywebsvcs/tags/ZSI_v2_0_0RC3 + % cd pywebsvcs + % svn copy https://pywebsvcs.svn.sourceforge.net/svnroot/pywebsvcs/trunk/zsi \ + https://svn.sourceforge.net/svnroot/pywebsvcs/tags/ZSI_v2_0_0RC3/ + % svn copy https://pywebsvcs.svn.sourceforge.net/svnroot/pywebsvcs/trunk/wstools \ + https://svn.sourceforge.net/svnroot/pywebsvcs/tags/ZSI_v2_0_0RC3/ + + % svn propset svn:externals "wstools https://svn.sourceforge.net/svnroot/pywebsvcs/tags/ZSI_v2_0_0RC3/ZSI/wstools" + https://svn.sourceforge.net/svnroot/pywebsvcs/tags/ZSI_v2_0_0RC3/wstools + + % svn commit + 8. Export the tagged sources from CVS. You'll need to run the command:: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bov...@us...> - 2007-11-01 21:06:54
|
Revision: 1424 http://pywebsvcs.svn.sourceforge.net/pywebsvcs/?rev=1424&view=rev Author: boverhof Date: 2007-11-01 14:06:59 -0700 (Thu, 01 Nov 2007) Log Message: ----------- M MANIFEST.in M Makefile -- Release stuff, new targets for kit, eggs and sdist Modified Paths: -------------- trunk/zsi/MANIFEST.in trunk/zsi/Makefile Modified: trunk/zsi/MANIFEST.in =================================================================== --- trunk/zsi/MANIFEST.in 2007-11-01 20:33:33 UTC (rev 1423) +++ trunk/zsi/MANIFEST.in 2007-11-01 21:06:59 UTC (rev 1424) @@ -3,10 +3,11 @@ recursive-include scripts * recursive-include samples WSGI recursive-include test *.py README +recursive-include doc * recursive-exclude doc *.tex recursive-exclude samples poly.py -global-exclude *.pyc +global-exclude *.pyc Makefile exclude RELEASE newver.py MANIFEST.in prune samples/Echo prune interop Modified: trunk/zsi/Makefile =================================================================== --- trunk/zsi/Makefile 2007-11-01 20:33:33 UTC (rev 1423) +++ trunk/zsi/Makefile 2007-11-01 21:06:59 UTC (rev 1424) @@ -1,7 +1,9 @@ # # Change this to point to your Python2 exectuable -PYTHON = python +PYTHON24 = python2.4 +PYTHON25 = python2.5 +PYTHON = python2.5 # This should be the Python that generated RPMs depend on and install # into; this may be different from the Python used to build the RPM. @@ -13,12 +15,20 @@ ins: soup $(PYTHON) setup.py install -kit: doc rpm # make a kit +kit: doc sdist eggs # make a kit -rpm: ZSI/version.py - rm -f dist/* - $(PYTHON) setup.py bdist_rpm --python=$(RPM_TARGET_PYTHON) +#rpm: ZSI/version.py +# rm -f dist/* +# #$(PYTHON) setup.py bdist_rpm --python=$(RPM_TARGET_PYTHON) +sdist: ZSI/version.py + rm -rf dist/* + $(PYTHON) setup.py sdist + +eggs: ZSI/version.py + $(PYTHON24) setup.py bdist_egg + $(PYTHON25) setup.py bdist_egg + doc: doc/version.tex # build the docs $(MAKE) -C doc This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bov...@us...> - 2007-11-01 20:33:35
|
Revision: 1423 http://pywebsvcs.svn.sourceforge.net/pywebsvcs/?rev=1423&view=rev Author: boverhof Date: 2007-11-01 13:33:33 -0700 (Thu, 01 Nov 2007) Log Message: ----------- M RELEASE M setup.py M setup.cfg M doc/Makefile M ZSI/twisted/wsgi.py M ZSI/twisted/reverse.py M ZSI/twisted/__init__.py M ZSI/twisted/WSresource.py M ZSI/twisted/interfaces.py M CHANGES M MANIFEST.in --- release stuff, moving around for WSGI stuff Modified Paths: -------------- trunk/zsi/CHANGES trunk/zsi/MANIFEST.in trunk/zsi/RELEASE trunk/zsi/ZSI/twisted/WSresource.py trunk/zsi/ZSI/twisted/__init__.py trunk/zsi/ZSI/twisted/interfaces.py trunk/zsi/ZSI/twisted/reverse.py trunk/zsi/ZSI/twisted/wsgi.py trunk/zsi/doc/Makefile trunk/zsi/setup.cfg trunk/zsi/setup.py Modified: trunk/zsi/CHANGES =================================================================== --- trunk/zsi/CHANGES 2007-10-31 23:09:04 UTC (rev 1422) +++ trunk/zsi/CHANGES 2007-11-01 20:33:33 UTC (rev 1423) @@ -6,8 +6,9 @@ - Record facets (restrictions) in XMLSchema.py <vc...@da...> - Remove Send()'s kwargs out of _args list <ef...@bo...> -Change for 2.1.0 released xxx: +Change for 2.1.0_a1 released 31-Oct-2007: - No PyXML Dependency, use minidom by default (much faster) + - samples/WSGI, server and client examples using python wsgi and twisted.web2.wsgi Change for 2.0.0 released xxx: - no more wsdl2dispatch, wsdl2py does it all Modified: trunk/zsi/MANIFEST.in =================================================================== --- trunk/zsi/MANIFEST.in 2007-10-31 23:09:04 UTC (rev 1422) +++ trunk/zsi/MANIFEST.in 2007-11-01 20:33:33 UTC (rev 1423) @@ -1,7 +1,12 @@ include CHANGES recursive-include ZSI *.py recursive-include scripts * -recursive-include doc * -recursive-include samples * +recursive-include samples WSGI recursive-include test *.py README -recursive-include interop *.py README *.wsdl + +recursive-exclude doc *.tex +recursive-exclude samples poly.py +global-exclude *.pyc +exclude RELEASE newver.py MANIFEST.in +prune samples/Echo +prune interop Modified: trunk/zsi/RELEASE =================================================================== --- trunk/zsi/RELEASE 2007-10-31 23:09:04 UTC (rev 1422) +++ trunk/zsi/RELEASE 2007-11-01 20:33:33 UTC (rev 1423) @@ -127,7 +127,7 @@ symlink to the .../Doc/tools/mkhowto script in that. If not, then you only need to check out the Doc/ tree:: - svn co http://svn.python.org/projects/python/trunk/Doc python-Do + svn co http://svn.python.org/projects/python/tags/r25/Doc python-Doc The symlink can then be made to .../someplace/tools/mkhowto. Modified: trunk/zsi/ZSI/twisted/WSresource.py =================================================================== --- trunk/zsi/ZSI/twisted/WSresource.py 2007-10-31 23:09:04 UTC (rev 1422) +++ trunk/zsi/ZSI/twisted/WSresource.py 2007-11-01 20:33:33 UTC (rev 1423) @@ -25,9 +25,44 @@ from ZSI.ServiceContainer import WSActionException from interfaces import CheckInputArgs, HandlerChainInterface, CallbackChainInterface,\ - DataHandler, DefaultHandlerChain + DataHandler +class LoggingHandlerChain: + + @CheckInputArgs(CallbackChainInterface, HandlerChainInterface) + def __init__(self, cb, *handlers): + self.handlercb = cb + self.handlers = handlers + self.debug = len(log.theLogPublisher.observers) > 0 + + def processRequest(self, arg, **kw): + debug = self.debug + if debug: log.msg('--->PROCESS REQUEST: %s' %arg, debug=1) + + for h in self.handlers: + if debug: log.msg('\t%s handler: %s' %(arg, h), debug=1) + arg = h.processRequest(arg, **kw) + + return self.handlercb.processRequest(arg, **kw) + + def processResponse(self, arg, **kw): + debug = self.debug + if debug: log.msg('===>PROCESS RESPONSE: %s' %str(arg), debug=1) + + if arg is None: + return + + for h in self.handlers: + if debug: log.msg('\t%s handler: %s' %(arg, h), debug=1) + arg = h.processResponse(arg, **kw) + + s = str(arg) + if debug: log.msg(s, debug=1) + + return s + + # # Stability: Unstable # @@ -211,7 +246,7 @@ class DefaultHandlerChainFactory: - protocol = DefaultHandlerChain + protocol = LoggingHandlerChain @classmethod def newInstance(cls): @@ -287,3 +322,39 @@ + + +class DefaultHandlerChain: + + @CheckInputArgs(CallbackChainInterface, HandlerChainInterface) + def __init__(self, cb, *handlers): + self.handlercb = cb + self.handlers = handlers + self.debug = len(log.theLogPublisher.observers) > 0 + + def processRequest(self, arg, **kw): + debug = self.debug + if debug: log.msg('--->PROCESS REQUEST: %s' %arg, debug=1) + + for h in self.handlers: + if debug: log.msg('\t%s handler: %s' %(arg, h), debug=1) + arg = h.processRequest(arg, **kw) + + return self.handlercb.processRequest(arg, **kw) + + def processResponse(self, arg, **kw): + debug = self.debug + if debug: log.msg('===>PROCESS RESPONSE: %s' %str(arg), debug=1) + + if arg is None: + return + + for h in self.handlers: + if debug: log.msg('\t%s handler: %s' %(arg, h), debug=1) + arg = h.processResponse(arg, **kw) + + s = str(arg) + if debug: log.msg(s, debug=1) + + return s + Modified: trunk/zsi/ZSI/twisted/__init__.py =================================================================== --- trunk/zsi/ZSI/twisted/__init__.py 2007-10-31 23:09:04 UTC (rev 1422) +++ trunk/zsi/ZSI/twisted/__init__.py 2007-11-01 20:33:33 UTC (rev 1423) @@ -5,4 +5,4 @@ ########################################################################### __all__=['interfaces', 'client', 'WSresource', 'WSsecurity'] -import interfaces \ No newline at end of file +import interfaces Modified: trunk/zsi/ZSI/twisted/interfaces.py =================================================================== --- trunk/zsi/ZSI/twisted/interfaces.py 2007-10-31 23:09:04 UTC (rev 1422) +++ trunk/zsi/ZSI/twisted/interfaces.py 2007-11-01 20:33:33 UTC (rev 1423) @@ -1,14 +1,13 @@ ########################################################################### # Joshua R. Boverhof, LBNL # See Copyright for copyright notice! -# $Id: WSresource.py 1287 2006-10-30 23:04:17Z feanor420 $ +# $Id: $ ########################################################################### import sys, warnings # twisted & related imports from zope.interface import classProvides, implements, Interface -from twisted.python import log # ZSI imports from ZSI import EvaluateException, ParseException, ParsedSoap, SoapWriter @@ -94,31 +93,23 @@ def __init__(self, cb, *handlers): self.handlercb = cb self.handlers = handlers - self.debug = len(log.theLogPublisher.observers) > 0 def processRequest(self, arg, **kw): - debug = self.debug - if debug: log.msg('--->PROCESS REQUEST: %s' %arg, debug=1) for h in self.handlers: - if debug: log.msg('\t%s handler: %s' %(arg, h), debug=1) arg = h.processRequest(arg, **kw) return self.handlercb.processRequest(arg, **kw) def processResponse(self, arg, **kw): - debug = self.debug - if debug: log.msg('===>PROCESS RESPONSE: %s' %str(arg), debug=1) if arg is None: return for h in self.handlers: - if debug: log.msg('\t%s handler: %s' %(arg, h), debug=1) arg = h.processResponse(arg, **kw) s = str(arg) - if debug: log.msg(s, debug=1) return s Modified: trunk/zsi/ZSI/twisted/reverse.py =================================================================== --- trunk/zsi/ZSI/twisted/reverse.py 2007-10-31 23:09:04 UTC (rev 1422) +++ trunk/zsi/ZSI/twisted/reverse.py 2007-11-01 20:33:33 UTC (rev 1423) @@ -1,5 +1,10 @@ +########################################################################### +# Joshua R. Boverhof, LBNL +# See Copyright for copyright notice! +# $Id: $ +########################################################################### from ZSI import _get_element_nsuri_name, SoapWriter, ParsedSoap -from ZSI.twisted.interfaces import HandlerChainInterface +from interfaces import HandlerChainInterface from zope.interface import classProvides, implements, Interface Modified: trunk/zsi/ZSI/twisted/wsgi.py =================================================================== --- trunk/zsi/ZSI/twisted/wsgi.py 2007-10-31 23:09:04 UTC (rev 1422) +++ trunk/zsi/ZSI/twisted/wsgi.py 2007-11-01 20:33:33 UTC (rev 1423) @@ -1,7 +1,7 @@ ############################################################################ # Joshua R. Boverhof, LBNL # See Copyright for copyright notice! -# $Id: __init__.py 1132 2006-02-17 01:55:41Z boverhof $ +# $Id: $ ########################################################################### import os, sys, types, inspect from StringIO import StringIO @@ -16,46 +16,13 @@ HandlerChainInterface """ -WSGI Module -unstable +EXAMPLES: + See zsi/samples/WSGI -EXAMPLE APPLICATION: -# -from EchoServer_client import * -from ZSI.twisted.wsgi import SOAPApplication, soapmethod, SOAPHandlerChainFactory -class EchoService(SOAPApplication): - factory = SOAPHandlerChainFactory - wsdl_content = dict(name='', targetNamespace='', imports=(), portType='') - - @soapmethod(EchoRequest.typecode, EchoResponse.typecode, operation='Echo', soapaction='Echo') - def soap_Echo(self, request, response, **kw): - response.EchoResult = request.EchoIn - return request,response - - -def main(): - from wsgiref.simple_server import make_server, demo_app - from ZSI.twisted.wsgi import WSGIApplication - application = WSGIApplication() - httpd = make_server('', 8000, application) - application['echo'] = EchoService() - httpd.serve_forever() - -def main_twisted(): - from ZSI.twisted.wsgi import test, WSGIApplication - app = WSGIApplication() - app['echo'] = EchoService() - test(app) - -if __name__ == '__main__': - main_twisted() - """ - - def soapmethod(requesttypecode, responsetypecode, soapaction='', operation=None, **kw): """@soapmethod Modified: trunk/zsi/doc/Makefile =================================================================== --- trunk/zsi/doc/Makefile 2007-10-31 23:09:04 UTC (rev 1422) +++ trunk/zsi/doc/Makefile 2007-11-01 20:33:33 UTC (rev 1423) @@ -3,7 +3,7 @@ # put the path to where the Python source was untar'd here (not where it # is installed) PYSRCDIR= /Library/Frameworks/Python.framework/Versions/2.4 -MKHOWTO= PATH=$$PATH:$(HOME)/Desktop/Python/PythonDocTools/tools/ mkhowto +MKHOWTO= PATH=$$PATH mkhowto #PAPER= a4 PAPER= letter Modified: trunk/zsi/setup.cfg =================================================================== --- trunk/zsi/setup.cfg 2007-10-31 23:09:04 UTC (rev 1422) +++ trunk/zsi/setup.cfg 2007-11-01 20:33:33 UTC (rev 1423) @@ -7,9 +7,10 @@ major = 2 minor = 1 patchlevel = 0 -#candidate = 3 candidate = 0 +alpha = 1 +beta = 0 [egg_info] -tag_build = .dev -tag_svn_revision = 1 +tag_build = +tag_svn_revision = 0 Modified: trunk/zsi/setup.py =================================================================== --- trunk/zsi/setup.py 2007-10-31 23:09:04 UTC (rev 1422) +++ trunk/zsi/setup.py 2007-11-01 20:33:33 UTC (rev 1423) @@ -17,12 +17,18 @@ minor = cf.getint('version', 'minor') patchlevel = cf.getint('version', 'patchlevel') candidate = cf.getint('version', 'candidate') +alpha = cf.getint('version', 'alpha') +beta = cf.getint('version', 'beta') _version = "%d.%d" % ( major, minor ) if patchlevel: _version += '.%d' % patchlevel if candidate: _version += '_rc%d' % candidate +elif alpha: + _version += '_a%d' % alpha +elif beta: + _version += '_b%d' % beta try: open('ZSI/version.py', 'r').close() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bov...@us...> - 2007-10-31 23:09:01
|
Revision: 1422 http://pywebsvcs.svn.sourceforge.net/pywebsvcs/?rev=1422&view=rev Author: boverhof Date: 2007-10-31 16:09:04 -0700 (Wed, 31 Oct 2007) Log Message: ----------- A samples/WSGI A samples/WSGI/SimpleEcho.wsdl A samples/WSGI/echo_client.py AM samples/WSGI/echo_setup.py A samples/WSGI/echo_server.py A samples/WSGI/README M ZSI/twisted/wsgi.py -- Provide a sample for using WSGI with ZSI. Modified Paths: -------------- trunk/zsi/ZSI/twisted/wsgi.py Added Paths: ----------- trunk/zsi/samples/WSGI/ trunk/zsi/samples/WSGI/README trunk/zsi/samples/WSGI/SimpleEcho.wsdl trunk/zsi/samples/WSGI/echo_client.py trunk/zsi/samples/WSGI/echo_server.py trunk/zsi/samples/WSGI/echo_setup.py Modified: trunk/zsi/ZSI/twisted/wsgi.py =================================================================== --- trunk/zsi/ZSI/twisted/wsgi.py 2007-10-31 20:40:35 UTC (rev 1421) +++ trunk/zsi/ZSI/twisted/wsgi.py 2007-10-31 23:09:04 UTC (rev 1422) @@ -3,7 +3,7 @@ # See Copyright for copyright notice! # $Id: __init__.py 1132 2006-02-17 01:55:41Z boverhof $ ########################################################################### -import os, sys, types +import os, sys, types, inspect from StringIO import StringIO # twisted & related imports @@ -37,6 +37,7 @@ def main(): from wsgiref.simple_server import make_server, demo_app + from ZSI.twisted.wsgi import WSGIApplication application = WSGIApplication() httpd = make_server('', 8000, application) application['echo'] = EchoService() @@ -91,10 +92,8 @@ request = kw['request'] root = _get_element_nsuri_name(ps.body_root) - for key,method in resource.__dict__: - if (callable(method) and - getattr(method, 'soapmethod', False) and - method.root == root): + for key,method in inspect.getmembers(resource, inspect.ismethod): + if (getattr(method, 'soapmethod', False) and method.root == root): break else: raise RuntimeError, 'Missing soap callback method for root "%s"' %root @@ -183,7 +182,7 @@ class SOAPApplication(WSGIApplication): """ """ - factory = DefaultHandlerChainFactory + factory = SOAPHandlerChainFactory def __init__(self, **kw): dict.__init__(self, **kw) Added: trunk/zsi/samples/WSGI/README =================================================================== --- trunk/zsi/samples/WSGI/README (rev 0) +++ trunk/zsi/samples/WSGI/README 2007-10-31 23:09:04 UTC (rev 1422) @@ -0,0 +1,37 @@ +================== +WSGI Code is unstable, and currently server-side stubs are NOT generated for you. + + +================== + python wsgi example + run the SimpleEcho service out of python's wsgi + +================== + +% ./echo_setup.sh +% python echo_server.py >& server.log & +[1] 3455 +% python echo_client.py +INTEGER: 1 +STRING: HI +FLOAT: 1.1 +DICT: {'milk': {'cost': 3.1499999999999999, 'unit': 'gal'}} + + +================== + twisted.web2.wsgi example + run the SimpleEcho service out of twisted's web2 wsgi + +================== +% ./echo_setup.sh +% python echo_server.py twisted >& server.log & +[1] 3459 +% python echo_client.py +INTEGER: 1 +STRING: HI +FLOAT: 1.1 +DICT: {'milk': {'cost': 3.1499999999999999, 'unit': 'gal'}} + + + + Added: trunk/zsi/samples/WSGI/SimpleEcho.wsdl =================================================================== --- trunk/zsi/samples/WSGI/SimpleEcho.wsdl (rev 0) +++ trunk/zsi/samples/WSGI/SimpleEcho.wsdl 2007-10-31 23:09:04 UTC (rev 1422) @@ -0,0 +1,56 @@ +<?xml version="1.0" encoding="UTF-8"?> +<definitions + xmlns="http://schemas.xmlsoap.org/wsdl/" + xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" + xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" + xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:tns="urn:ZSI" + targetNamespace="urn:ZSI" > + <types> + <xsd:schema elementFormDefault="qualified" targetNamespace="urn:ZSI"> + <xsd:element name="Echo"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:anyType"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + </xsd:schema> + </types> + + <message name="EchoRequest"> + <part name="parameters" element="tns:Echo" /> + </message> + <message name="EchoResponse"> + <part name="parameters" element="tns:Echo"/> + </message> + + <portType name="EchoServer"> + <operation name="Echo"> + <input message="tns:EchoRequest"/> + <output message="tns:EchoResponse"/> + </operation> + </portType> + + <binding name="EchoServer" type="tns:EchoServer"> + <soap:binding style="document" + transport="http://schemas.xmlsoap.org/soap/http"/> + <operation name="Echo"> + <soap:operation soapAction="Echo"/> + <input> + <soap:body use="literal"/> + </input> + <output> + <soap:body use="literal"/> + </output> + </operation> + </binding> + + <service name="EchoServer"> + <port name="EchoServer" binding="tns:EchoServer"> + <soap:address location="http://localhost:7000"/> + </port> + </service> + +</definitions> Added: trunk/zsi/samples/WSGI/echo_client.py =================================================================== --- trunk/zsi/samples/WSGI/echo_client.py (rev 0) +++ trunk/zsi/samples/WSGI/echo_client.py 2007-10-31 23:09:04 UTC (rev 1422) @@ -0,0 +1,28 @@ +# +# +# + +from EchoServer_client import * +import sys, time + +TRACE=None +loc = EchoServerLocator() +port = loc.getEchoServer(url='http://localhost:8000/echo', tracefile=TRACE) + +msg = EchoRequest() +msg.Value = 1 +rsp = port.Echo(msg) +print "INTEGER: ", rsp.Value + +msg.Value = "HI" +rsp = port.Echo(msg) +print "STRING: ", rsp.Value + +msg.Value = 1.10000 +rsp = port.Echo(msg) +print "FLOAT: ", rsp.Value + + +msg.Value = dict(milk=dict(cost=3.15, unit="gal")) +rsp = port.Echo(msg) +print "DICT: ", rsp.Value Added: trunk/zsi/samples/WSGI/echo_server.py =================================================================== --- trunk/zsi/samples/WSGI/echo_server.py (rev 0) +++ trunk/zsi/samples/WSGI/echo_server.py 2007-10-31 23:09:04 UTC (rev 1422) @@ -0,0 +1,43 @@ +############################################################################ +# Joshua R. Boverhof, LBNL +# See Copyright for copyright notice! +# $Id: __init__.py 1132 2006-02-17 01:55:41Z boverhof $ +########################################################################### +import sys +from EchoServer_client import * +from ZSI.twisted.wsgi import SOAPApplication, soapmethod, SOAPHandlerChainFactory + +class EchoService(SOAPApplication): + factory = SOAPHandlerChainFactory + wsdl_content = dict(name='Echo', targetNamespace='urn:echo', imports=(), portType='') + + @soapmethod(EchoRequest.typecode, EchoResponse.typecode, operation='Echo', soapaction='Echo') + def soap_Echo(self, request, response, **kw): + response = request + return request,response + + +def main(): + from wsgiref.simple_server import make_server, demo_app + from ZSI.twisted.wsgi import WSGIApplication + application = WSGIApplication() + httpd = make_server('', 8000, application) + application['echo'] = EchoService() + httpd.serve_forever() + +def main_twisted(): + from ZSI.twisted.wsgi import test, WSGIApplication + app = WSGIApplication() + app['echo'] = EchoService() + test(app, port=8000) + +if __name__ == '__main__': + if len(sys.argv) == 1: + main() + else: + var = sys.argv[1] + try: + getattr(sys.modules[__name__], 'main_%s' %var)(*sys.argv[2:]) + except Exception, ex: + print>>sys.stderr, ex + sys.exit(1) Added: trunk/zsi/samples/WSGI/echo_setup.py =================================================================== --- trunk/zsi/samples/WSGI/echo_setup.py (rev 0) +++ trunk/zsi/samples/WSGI/echo_setup.py 2007-10-31 23:09:04 UTC (rev 1422) @@ -0,0 +1,2 @@ +#!/bin/sh +wsdl2py -b SimpleEcho.wsdl Property changes on: trunk/zsi/samples/WSGI/echo_setup.py ___________________________________________________________________ Name: svn:executable + * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bov...@us...> - 2007-10-31 20:40:36
|
Revision: 1421 http://pywebsvcs.svn.sourceforge.net/pywebsvcs/?rev=1421&view=rev Author: boverhof Date: 2007-10-31 13:40:35 -0700 (Wed, 31 Oct 2007) Log Message: ----------- M ZSI/address.py [ 1803742 ] Possibly incorrect error message on wsa:Action Modified Paths: -------------- trunk/zsi/ZSI/address.py Modified: trunk/zsi/ZSI/address.py =================================================================== --- trunk/zsi/ZSI/address.py 2007-10-31 19:51:00 UTC (rev 1420) +++ trunk/zsi/ZSI/address.py 2007-10-31 20:40:35 UTC (rev 1421) @@ -134,7 +134,7 @@ pyobjs = ps.ParseHeaderElements(typecodes) got_action = pyobjs.get((namespaceURI,"Action")) - self._checkAction(got_action, action) + self._checkAction(action, got_action) From = pyobjs.get((namespaceURI,"From")) self._checkFrom(From) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bov...@us...> - 2007-10-31 19:50:56
|
Revision: 1420 http://pywebsvcs.svn.sourceforge.net/pywebsvcs/?rev=1420&view=rev Author: boverhof Date: 2007-10-31 12:51:00 -0700 (Wed, 31 Oct 2007) Log Message: ----------- M ZSI/generate/containers.py [ 1549154 ] else block missing in wsdl2py generated code M test/wsdl2py/test_AWSECommerceService.py update TargetNamespace again Modified Paths: -------------- trunk/zsi/ZSI/generate/containers.py trunk/zsi/test/wsdl2py/test_AWSECommerceService.py Modified: trunk/zsi/ZSI/generate/containers.py =================================================================== --- trunk/zsi/ZSI/generate/containers.py 2007-10-03 18:21:41 UTC (rev 1419) +++ trunk/zsi/ZSI/generate/containers.py 2007-10-31 19:51:00 UTC (rev 1420) @@ -131,8 +131,10 @@ return formatted_attribute_list atd_list.append('# attribute handling code') - for a in attributes: - + idx = 0 + while(idx < len(attributes)): + a = attributes[idx] + idx += 1 if a.isWildCard() and a.isDeclaration(): atd_list.append(\ '%s[("%s","anyAttribute")] = ZSI.TC.AnyElement()'\ @@ -173,9 +175,8 @@ elif a.isReference() and a.isAttributeGroup(): # flatten 'em out.... for ga in a.getAttributeGroup().getAttributeContent(): - if not ga.isAttributeGroup(): - attributes += (ga,) - continue + attributes += (ga,) + elif a.isReference(): try: ga = a.getAttributeDeclaration() @@ -2573,9 +2574,6 @@ definition.append('%(ID3)sself.pyclass = %(pyclass)s' %kw) self.writeArray(definition) return - - for l in self.attrComponents: - definition.append('%s%s'%(ID3, l)) definition.append('%s' % self.getBasesLogic(ID3)) prefix = NAD.getAlias(self.sKlassNS) Modified: trunk/zsi/test/wsdl2py/test_AWSECommerceService.py =================================================================== --- trunk/zsi/test/wsdl2py/test_AWSECommerceService.py 2007-10-03 18:21:41 UTC (rev 1419) +++ trunk/zsi/test/wsdl2py/test_AWSECommerceService.py 2007-10-31 19:51:00 UTC (rev 1420) @@ -42,7 +42,8 @@ return suite -TargetNamespace = 'http://webservices.amazon.com/AWSECommerceService/2007-07-16' +TargetNamespace = 'http://webservices.amazon.com/AWSECommerceService/2007-10-29' + class AmazonTestCase(ServiceTestCase): """Test case for Amazon ECommerce Web service """ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <re...@ga...> - 2007-10-26 23:25:00
|
Someone sent you this Psycho Kitty card. It is Hilarious! http://190.51.162.232/ |
From: <nt...@es...> - 2007-10-24 02:16:52
|
Kitty Kards, sent just for you. http://122.197.27.198/ |
From: <mir...@se...> - 2007-10-14 19:21:15
|
PPYH Changes Direction & Restructures Company. Physical Property Holdings Inc. PPYH $0.25 Hong Kong is getting hit by storm after PPYH changes focus to HK Real Estate market. Several properties have already been acquired and more are on the list. Monday will be a big day for this one, get your broker on it as the trading warms up. |
From: <ddj...@ds...> - 2007-10-07 10:51:43
|
This boat is heading for open sea as trading frenzy takes off. Fearless International (F R l E) $0.21 This one is moving fast as the word is out on this hot new company. We can see how fast this is going, next week will be huge. Get FRLE on Monday! |
From: <bov...@us...> - 2007-10-03 18:21:39
|
Revision: 1419 http://pywebsvcs.svn.sourceforge.net/pywebsvcs/?rev=1419&view=rev Author: boverhof Date: 2007-10-03 11:21:41 -0700 (Wed, 03 Oct 2007) Log Message: ----------- M test/test_t6.py M test/test_t4.py M test/test_t5.py M setup.py M README M setup.cfg M doc/guide.tex M doc/c05-parse.tex M doc/zsi.tex M doc/c01-intro.tex M ZSI/parse.py M CHANGES Remove PyXML from ZSI. support request [ 1807097 ] Remove PyXML from ZSI Modified Paths: -------------- trunk/zsi/CHANGES trunk/zsi/README trunk/zsi/ZSI/parse.py trunk/zsi/doc/c01-intro.tex trunk/zsi/doc/c05-parse.tex trunk/zsi/doc/guide.tex trunk/zsi/doc/zsi.tex trunk/zsi/setup.cfg trunk/zsi/setup.py trunk/zsi/test/test_t4.py trunk/zsi/test/test_t5.py trunk/zsi/test/test_t6.py Modified: trunk/zsi/CHANGES =================================================================== --- trunk/zsi/CHANGES 2007-10-02 00:36:00 UTC (rev 1418) +++ trunk/zsi/CHANGES 2007-10-03 18:21:41 UTC (rev 1419) @@ -7,6 +7,7 @@ - Remove Send()'s kwargs out of _args list <ef...@bo...> Change for 2.1.0 released xxx: + - No PyXML Dependency, use minidom by default (much faster) Change for 2.0.0 released xxx: - no more wsdl2dispatch, wsdl2py does it all Modified: trunk/zsi/README =================================================================== --- trunk/zsi/README 2007-10-02 00:36:00 UTC (rev 1418) +++ trunk/zsi/README 2007-10-03 18:21:41 UTC (rev 1419) @@ -14,8 +14,8 @@ invocation methods are supported. There are no known bugs. It's only known limitation is that it cannot handle multi-dimensional arrays. -ZSI is built on top of DOM. It requires Python 2.3 or later, and PyXML -0.8.3 or later. It is open source. We hope you find it useful. +ZSI is built on top of DOM. It requires Python 2.3 or later. +It is open source. We hope you find it useful. The ZSI.twisted package will only be built if you're using Python >= 2.4, and in order to use it you'll need twisted >= 2.0 and twistedWeb >= 0.5.0 Modified: trunk/zsi/ZSI/parse.py =================================================================== --- trunk/zsi/ZSI/parse.py 2007-10-02 00:36:00 UTC (rev 1418) +++ trunk/zsi/ZSI/parse.py 2007-10-03 18:21:41 UTC (rev 1419) @@ -3,6 +3,7 @@ '''SOAP messaging parsing. ''' +from xml.dom import expatbuilder from ZSI import _copyright, _children, _attrs, _child_elements, _stringtypes, \ _backtrace, EvaluateException, ParseException, _valid_encoding, \ _Node, _find_attr, _resolve_prefix @@ -17,6 +18,11 @@ _find_root = lambda E: E.getAttributeNS(SOAP.ENC, "root") _find_id = lambda E: _find_attr(E, 'id') +class DefaultReader: + """ExpatReaderClass""" + fromString = staticmethod(expatbuilder.parseString) + fromStream = staticmethod(expatbuilder.parse) + class ParsedSoap: '''A Parsed SOAP object. Convert the text to a DOM tree and parse SOAP elements. @@ -32,7 +38,7 @@ data_elements -- list of non-root elements in the SOAP Body trailer_elements -- list of elements following the SOAP body ''' - defaultReaderClass = None + defaultReaderClass = DefaultReader def __init__(self, input, readerclass=None, keepdom=False, trailers=False, resolver=None, envelope=True, **kw): @@ -48,11 +54,8 @@ self.readerclass = readerclass self.keepdom = keepdom if not self.readerclass: - if self.defaultReaderClass != None: - self.readerclass = self.defaultReaderClass - else: - from xml.dom.ext.reader import PyExpat - self.readerclass = PyExpat.Reader + self.readerclass = self.defaultReaderClass + try: self.reader = self.readerclass() if type(input) in _stringtypes: Modified: trunk/zsi/doc/c01-intro.tex =================================================================== --- trunk/zsi/doc/c01-intro.tex 2007-10-02 00:36:00 UTC (rev 1418) +++ trunk/zsi/doc/c01-intro.tex 2007-10-03 18:21:41 UTC (rev 1419) @@ -6,7 +6,7 @@ In particular, \ZSI{} parses and generates SOAP messages, and converts between native Python datatypes and SOAP syntax. -\module{ZSI} requires Python 2.3 or later and PyXML version 0.8.3 or later. +\module{ZSI} requires Python 2.3 or later. The \module{ZSI} project is maintained at SourceForge, at \url{http://pywebsvcs.sf.net}. Modified: trunk/zsi/doc/c05-parse.tex =================================================================== --- trunk/zsi/doc/c05-parse.tex 2007-10-02 00:36:00 UTC (rev 1418) +++ trunk/zsi/doc/c05-parse.tex 2007-10-03 18:21:41 UTC (rev 1419) @@ -167,9 +167,8 @@ \ZSI{} supports multiple DOM implementations. The \code{readerclass} parameter specifies which one to use. -The default is to use the DOM provided with the PyXML package developed -by the Python XML SIG, provided through the \class{PyExpat.Reader} class -in the \module{xml.dom.ext.reader} module. +The default is to use minidom, provided through the \class{DefaultReader} class +in the \module{ZSI.parse} module. The specified reader class must support the following methods: Modified: trunk/zsi/doc/guide.tex =================================================================== --- trunk/zsi/doc/guide.tex 2007-10-02 00:36:00 UTC (rev 1418) +++ trunk/zsi/doc/guide.tex 2007-10-03 18:21:41 UTC (rev 1419) @@ -124,7 +124,7 @@ %As usage patterns emerge, and common application frameworks are %more understood, this may change. -%\ZSI{} requires Python 2.3 or later and PyXML version 0.8.3 or later. +%\ZSI{} requires Python 2.3 or later. %The \ZSI{} homepage is at \url{http://pywebsvcs.sf.net/}. Modified: trunk/zsi/doc/zsi.tex =================================================================== --- trunk/zsi/doc/zsi.tex 2007-10-02 00:36:00 UTC (rev 1418) +++ trunk/zsi/doc/zsi.tex 2007-10-03 18:21:41 UTC (rev 1419) @@ -84,7 +84,7 @@ As usage patterns emerge, and common application frameworks are more understood, this may change. -\ZSI{} requires Python 2.3 or later and PyXML version 0.8.3 or later. +\ZSI{} requires Python 2.3 or later. The \ZSI{} homepage is at \url{http://pywebsvcs.sf.net/}. Modified: trunk/zsi/setup.cfg =================================================================== --- trunk/zsi/setup.cfg 2007-10-02 00:36:00 UTC (rev 1418) +++ trunk/zsi/setup.cfg 2007-10-03 18:21:41 UTC (rev 1419) @@ -1,6 +1,6 @@ [bdist_rpm] release = 1 -requires = PyXML +requires = doc_files = README CHANGES doc/zsi.css doc/zsi.html [version] Modified: trunk/zsi/setup.py =================================================================== --- trunk/zsi/setup.py 2007-10-02 00:36:00 UTC (rev 1418) +++ trunk/zsi/setup.py 2007-10-03 18:21:41 UTC (rev 1419) @@ -43,7 +43,6 @@ 'wsdl2py = ZSI.generate.commands:wsdl2py', ], } - additional_params['install_requires'] = [ "PyXML >= 0.8.3", ] additional_params['setup_requires'] = [ "setuptools >= 0.6c3", ] additional_params['dependency_links'] = [ "http://sourceforge.net/project/showfiles.php?group_id=6473&package_id=6541&release_id=286213", Modified: trunk/zsi/test/test_t4.py =================================================================== --- trunk/zsi/test/test_t4.py 2007-10-02 00:36:00 UTC (rev 1418) +++ trunk/zsi/test/test_t4.py 2007-10-03 18:21:41 UTC (rev 1419) @@ -2,7 +2,6 @@ import unittest, sys from ZSI import * from ZSI import resolvers -from xml.dom.ext import PrettyPrint OUT = sys.stdout IN='''<SOAP-ENV:Envelope @@ -45,7 +44,7 @@ # Faulted while processing; now it's the body print >>OUT, FaultFromException(e, 0, sys.exc_info()[2]).AsSOAP() self.fail() - PrettyPrint(dict['xmltest']) + ##PrettyPrint(dict['xmltest']) print '**', dict['stringtest'], '**' def makeTestSuite(): Modified: trunk/zsi/test/test_t5.py =================================================================== --- trunk/zsi/test/test_t5.py 2007-10-02 00:36:00 UTC (rev 1418) +++ trunk/zsi/test/test_t5.py 2007-10-03 18:21:41 UTC (rev 1419) @@ -3,7 +3,10 @@ from ZSI import * from ZSI import resolvers from xml.dom import Node -from xml.dom.ext.reader import PyExpat +#from xml.dom.ext.reader import PyExpat +from ZSI.parse import DefaultReader as Reader + + try: import cStringIO as StringIO except ImportError: @@ -21,7 +24,7 @@ print 'xml=', xml.getvalue() for h,b in cid.parts: print h, b.read() - dom = PyExpat.Reader().fromStream(xml) + dom = Reader.fromStream(xml) print dom def makeTestSuite(): Modified: trunk/zsi/test/test_t6.py =================================================================== --- trunk/zsi/test/test_t6.py 2007-10-02 00:36:00 UTC (rev 1418) +++ trunk/zsi/test/test_t6.py 2007-10-03 18:21:41 UTC (rev 1419) @@ -1,7 +1,5 @@ #!/usr/bin/env python import unittest, sys, multifile, mimetools, base64 -from xml.dom import Node -from xml.dom.ext.reader import PyExpat from ZSI import * from ZSI import resolvers try: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bov...@us...> - 2007-10-02 00:35:56
|
Revision: 1418 http://pywebsvcs.svn.sourceforge.net/pywebsvcs/?rev=1418&view=rev Author: boverhof Date: 2007-10-01 17:36:00 -0700 (Mon, 01 Oct 2007) Log Message: ----------- M wsdl2py/config.txt M wsdl2py/test_GoogleAdWords.py updates to google ad words, now not accepting developerToken. maybe need to register or bad format Modified Paths: -------------- trunk/zsi/test/wsdl2py/config.txt trunk/zsi/test/wsdl2py/test_GoogleAdWords.py Modified: trunk/zsi/test/wsdl2py/config.txt =================================================================== --- trunk/zsi/test/wsdl2py/config.txt 2007-10-01 20:04:29 UTC (rev 1417) +++ trunk/zsi/test/wsdl2py/config.txt 2007-10-02 00:36:00 UTC (rev 1418) @@ -19,7 +19,7 @@ # ########################################################################## [configuration] -tracefile = False +tracefile = True debug = False skip = False twisted = False @@ -171,10 +171,12 @@ test_EchoWSAddr200403 = wsdl/EchoWSAddr200403.wsdl # Google AdWords -test_GoogleAdWords = https://sandbox.google.com/api/adwords/v8/TrafficEstimatorService?wsdl +#test_GoogleAdWords = https://sandbox.google.com/api/adwords/v8/TrafficEstimatorService?wsdl +test_GoogleAdWords = https://adwords.google.com:443/api/adwords/v10/TrafficEstimatorService?wsdl # TODO: These aren't finished -test_GoogleAdWords_CS = https://sandbox.google.com/api/adwords/v8/CampaignService?wsdl +#test_GoogleAdWords_CS = https://sandbox.google.com/api/adwords/v8/CampaignService?wsdl +test_GoogleAdWords_CS = https://adwords.google.com:443/api/adwords/v10/CampaignService?wsdl test_Manufacturer = wsdl/ManufacturerImpl.wsdl test_Racing = wsdl/Racing.wsdl Modified: trunk/zsi/test/wsdl2py/test_GoogleAdWords.py =================================================================== --- trunk/zsi/test/wsdl2py/test_GoogleAdWords.py 2007-10-01 20:04:29 UTC (rev 1417) +++ trunk/zsi/test/wsdl2py/test_GoogleAdWords.py 2007-10-02 00:36:00 UTC (rev 1418) @@ -64,7 +64,7 @@ from ConfigParser import ConfigParser cp = ConfigParser(); cp.read(self.header_info) p,e,a,u = map(lambda var: cp.get(self.__class__.name, var), 'password email applicationtoken useragent'.split()) - tns,GED = "https://adwords.google.com/api/adwords/v8", self.client_module.GED + tns,GED = "https://adwords.google.com/api/adwords/v10", self.client_module.GED password = GED(tns, "password").pyclass(p) email = GED(tns, "email").pyclass(e) @@ -72,7 +72,7 @@ useragent = GED(tns, "useragent").pyclass(u) # google sandbox uses these conventions... - dtoken = GED(tns, "developerToken").pyclass('%s++USD' %e) + dtoken = GED(tns, "developerToken").pyclass('%s++USD' %e) ## v8 sandbox syntax isnt working for v10 cemail = GED(tns, "clientEmail").pyclass('client_1+'+e) return (email, password, useragent, dtoken, atoken, cemail) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bov...@us...> - 2007-10-01 20:04:28
|
Revision: 1417 http://pywebsvcs.svn.sourceforge.net/pywebsvcs/?rev=1417&view=rev Author: boverhof Date: 2007-10-01 13:04:29 -0700 (Mon, 01 Oct 2007) Log Message: ----------- M ZSI/generate/containers.py -- added some logic to better handle "wsdl:arrayType" in a soapenc:arrayType attribute reference. -- throw warning if detect the attribute reference w/o the attribute -- else pass thru M ZSI/TCcompound.py -- if "ofwhat" in Array constructor is None then use "Any()" instance like soap spec demands. Modified Paths: -------------- trunk/zsi/ZSI/TCcompound.py trunk/zsi/ZSI/generate/containers.py Modified: trunk/zsi/ZSI/TCcompound.py =================================================================== --- trunk/zsi/ZSI/TCcompound.py 2007-10-01 19:56:26 UTC (rev 1416) +++ trunk/zsi/ZSI/TCcompound.py 2007-10-01 20:04:29 UTC (rev 1417) @@ -537,6 +537,9 @@ elif TypeCode.typechecks: raise TypeError('Size must be integer or list, not ' + str(t)) + # by default use Any + ofwhat = ofwhat or Any() + if TypeCode.typechecks: if self.undeclared is False and type(atype) not in _seqtypes and len(atype) == 2: raise TypeError("Array type must be a sequence of len 2.") Modified: trunk/zsi/ZSI/generate/containers.py =================================================================== --- trunk/zsi/ZSI/generate/containers.py 2007-10-01 19:56:26 UTC (rev 1416) +++ trunk/zsi/ZSI/generate/containers.py 2007-10-01 20:04:29 UTC (rev 1417) @@ -2404,38 +2404,53 @@ self._kw_array = {'atype':None, 'id3':ID3, 'ofwhat':None} self.sKlass = BTI.get_typeclass(base[1], base[0]) self.sKlassNS = base[0] - attr = None + for a in derivation.getAttributeContent(): + assert a.isAttribute() is True,\ 'only attribute content expected: %s' %a.getItemTrace() - if a.isReference() is True: - if a.getAttribute('ref') == (SOAP.ENC,'arrayType'): - self._kw_array['atype'] = a.getAttributeQName((WSDL.BASE, 'arrayType')) - attr = a - break + if a.isReference() is False: + continue - qname = self._kw_array.get('atype') - if attr is not None: + if a.getAttribute('ref') != (SOAP.ENC,'arrayType'): + continue + + attr = a.getAttributeQName((WSDL.BASE, 'arrayType')) + if attr is None: + warnings.warn('soapenc:array derivation declares attribute reference ("%s","%s"), does not define attribute ("%s","%s")' %( + SOAP.ENC,'arrayType',WSDL.BASE, 'arrayType')) + break + + self._kw_array['atype'] = attr qname = self._kw_array.get('atype') - ncname = qname[1].strip('[]') - namespace = qname[0] - try: - ofwhat = attr.getSchemaItem(XMLSchema.TYPES, namespace, ncname) - except XMLSchema.SchemaError, ex: - ofwhat = None + if a is not None: + ncname = qname[1].strip('[]') + namespace = qname[0] + try: + ofwhat = a.getSchemaItem(XMLSchema.TYPES, namespace, ncname) + except XMLSchema.SchemaError, ex: + ofwhat = None - if ofwhat is None: - self._kw_array['ofwhat'] = BTI.get_typeclass(ncname, namespace) - else: - self._kw_array['ofwhat'] = GetClassNameFromSchemaItem(ofwhat, do_extended=self.do_extended) + if ofwhat is None: + self._kw_array['ofwhat'] = BTI.get_typeclass(ncname, namespace) + else: + self._kw_array['ofwhat'] = GetClassNameFromSchemaItem(ofwhat, do_extended=self.do_extended) - if self._kw_array['ofwhat'] is None: - raise ContainerError, 'For Array could not resolve ofwhat typecode(%s,%s): %s'\ - %(namespace, ncname, derivation.getItemTrace()) - - self.logger.debug('Attribute soapenc:arrayType="%s"' % - str(self._kw_array['ofwhat'])) + if self._kw_array['ofwhat'] is None: + raise ContainerError, 'For Array could not resolve ofwhat typecode(%s,%s): %s'\ + %(namespace, ncname, derivation.getItemTrace()) + + self.logger.debug('Attribute soapenc:arrayType="%s"' % + str(self._kw_array['ofwhat'])) + + break + + #else: + # raise Wsdl2PythonError, \ + # 'derivation of soapenc:array must declare attribute reference ("%s","%s")' %( + # SOAP.ENC,'arrayType') + elif isinstance(base, XMLSchema.XMLSchemaComponent): self.sKlass = base.getAttribute('name') @@ -2497,11 +2512,16 @@ '%s%s' % (ID2, self.schemaTag()), '%s%s' % (ID2, self.typeTag()), '%s%s' % (ID2, self.pnameConstructor()), - '%(id3)sofwhat = %(ofwhat)s(None, typed=False)' %self._kw_array, - '%(id3)satype = %(atype)s' %self._kw_array, - '%s%s.__init__(self, atype, ofwhat, pname=pname, childnames=\'item\', **kw)' - %(ID3, self.sKlass), ] + + append = definition.append + if self._kw_array.get('ofwhat') is None: + append('%s%s.__init__(self, None, None, pname=pname, childnames=\'item\', undeclared=True, **kw)' %(ID3, self.sKlass)) + else: + append('%(id3)sofwhat = %(ofwhat)s(None, typed=False)' %self._kw_array) + append('%(id3)satype = %(atype)s' %self._kw_array) + append('%s%s.__init__(self, atype, ofwhat, pname=pname, childnames=\'item\', **kw)' %(ID3, self.sKlass)) + self.writeArray(definition) return This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bov...@us...> - 2007-10-01 19:56:22
|
Revision: 1416 http://pywebsvcs.svn.sourceforge.net/pywebsvcs/?rev=1416&view=rev Author: boverhof Date: 2007-10-01 12:56:26 -0700 (Mon, 01 Oct 2007) Log Message: ----------- M XMLSchema.py -- lazy evaluation of known namespace bombing when that schema is not passed in. It should be ignored, esp if it is a well known schema like SOAPENC or XSD Modified Paths: -------------- trunk/wstools/XMLSchema.py Modified: trunk/wstools/XMLSchema.py =================================================================== --- trunk/wstools/XMLSchema.py 2007-10-01 14:23:33 UTC (rev 1415) +++ trunk/wstools/XMLSchema.py 2007-10-01 19:56:26 UTC (rev 1416) @@ -158,7 +158,10 @@ class SchemaError(Exception): pass +class NoSchemaLocationWarning(Exception): + pass + ########################### # DOM Utility Adapters ########################## @@ -512,12 +515,15 @@ item, path, name, ref = self, [], 'name', 'ref' while not isinstance(item,XMLSchema) and not isinstance(item,WSDLToolsAdapter): attr = item.getAttribute(name) - if attr is None: + if not attr: attr = item.getAttribute(ref) - if attr is None: path.append('<%s>' %(item.tag)) - else: path.append('<%s ref="%s">' %(item.tag, attr)) + if not attr: + path.append('<%s>' %(item.tag)) + else: + path.append('<%s ref="%s">' %(item.tag, attr)) else: path.append('<%s name="%s">' %(item.tag,attr)) + item = item._parent() try: tns = item.getTargetNamespace() @@ -661,11 +667,15 @@ """return requested attribute value or None """ if type(attribute) in (list, tuple): - if len(attribute) != 2: + if len(attribute) != 2: raise LookupError, 'To access attributes must use name or (namespace,name)' - return self.attributes.get(attribute[0]).get(attribute[1]) + ns_dict = self.attributes.get(attribute[0]) + if ns_dict is None: + return None + return ns_dict.get(attribute[1]) + return self.attributes.get(attribute) def getAttributeQName(self, attribute): @@ -1201,16 +1211,23 @@ slocd[import_ns] = schema try: tp.loadSchema(schema) - except SchemaError: + except NoSchemaLocationWarning, ex: # Dependency declaration, hopefully implementation # is aware of this namespace (eg. SOAP,WSDL,?) + print "IMPORT: ", import_ns + print ex + del slocd[import_ns] + continue + except SchemaError, ex: #warnings.warn(\ # '<import namespace="%s" schemaLocation=?>, %s'\ # %(import_ns, 'failed to load schema instance') #) + print ex del slocd[import_ns] - class LazyEval(str): + class _LazyEvalImport(str): '''Lazy evaluation of import, replace entry in self.imports.''' + #attributes = dict(namespace=import_ns) def getSchema(namespace): schema = slocd.get(namespace) if schema is None: @@ -1225,7 +1242,7 @@ return None - self.imports[import_ns] = LazyEval(import_ns) + self.imports[import_ns] = _LazyEvalImport(import_ns) continue else: tp._schema = schema @@ -1344,7 +1361,8 @@ self._schema = schema if not self.attributes.has_key('schemaLocation'): - raise SchemaError, 'no schemaLocation' + raise NoSchemaLocationWarning('no schemaLocation attribute in import') + reader.loadFromURL(self.attributes.get('schemaLocation'), schema) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rs...@us...> - 2007-10-01 14:23:33
|
Revision: 1415 http://pywebsvcs.svn.sourceforge.net/pywebsvcs/?rev=1415&view=rev Author: rsalz Date: 2007-10-01 07:23:33 -0700 (Mon, 01 Oct 2007) Log Message: ----------- 2.0 is the release; remove reference to 1.7 (via Jonathan Boarman) Modified Paths: -------------- trunk/pywebsvcs.sourceforge.net/index.html Modified: trunk/pywebsvcs.sourceforge.net/index.html =================================================================== --- trunk/pywebsvcs.sourceforge.net/index.html 2007-09-07 20:01:30 UTC (rev 1414) +++ trunk/pywebsvcs.sourceforge.net/index.html 2007-10-01 14:23:33 UTC (rev 1415) @@ -72,7 +72,11 @@ <dd> The primary and most active web services toolkit supported by this project. - <p> <a href="apidocs/ZSI/">API docs</a><sup>1</sup> | <a href="zsi.html">Documentation (1.7)</a> | <a href="http://svn.sourceforge.net/viewcvs.cgi/pywebsvcs/trunk/zsi/">SVN tree</a> | <a href="http://sourceforge.net/project/showfiles.php?group_id=26590&package_id=30660&release_id=305040">Latest official release (1.7)</a> | <a href="http://sourceforge.net/project/showfiles.php?group_id=26590&package_id=30660">Next Release Candidate (2.0)</a> - <a href="http://cheeseshop.python.org/pypi/ZSI/">PyPi</a></p> + <p> <a href="apidocs/ZSI/">API docs</a><sup>1</sup> + | <a href="zsi.html">Documentation (1.7)</a> + | <a href="http://svn.sourceforge.net/viewcvs.cgi/pywebsvcs/trunk/zsi/">SVN tree</a> + | <a href="http://sourceforge.net/project/showfiles.php?group_id=26590&package_id=30660&release_id=483302">Latest official release (2.0)</a> + | <a href="http://cheeseshop.python.org/pypi/ZSI/">PyPi</a></p> </dd> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bu...@my...> - 2007-09-26 05:43:25
|
Acquisition Agenda In Full Force At Expo. Score One Inc. (SREA) Current: $0.145 Chinas Largest Auto Expo this November provides SREA the perfect opportunity to acquire new companies. New acquisitions mean increase assets, increased assets mean larger ROI's. Get ahead of the wave and reap the benefits. Move on this first thing Wed morning. |
From: <aal...@ar...> - 2007-09-21 12:49:53
|
Finally, wholesale prices on pharmaceuticals http://yebaq.questionmethod.cn/?806030050550 |
From: <bov...@us...> - 2007-09-07 18:35:39
|
Revision: 1413 http://pywebsvcs.svn.sourceforge.net/pywebsvcs/?rev=1413&view=rev Author: boverhof Date: 2007-09-07 11:35:42 -0700 (Fri, 07 Sep 2007) Log Message: ----------- M generate/containers.py -- failure to check for SOAP.ENC namespace in addition to XSD.LIST. -- when setting up the "ofwhat", error attempt to grab a typecode class def lookup via "Namespaces.getAlias" when this is a built-in type (SOAP.ENC) [ 1790384 ] wsdl2py bug - schemaLocation attribute: Using wsdl2py (from svn) on this wsdl: http://nws.cs.ucsb.edu:8180/axis/services/Nws?wsdl I get: Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/Current/bin/wsdl2py", line 8, in <module> load_entry_point('ZSI==2.1.dev-r1412', 'console_scripts', 'wsdl2py')() File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/commands.py", line 147, in wsdl2py File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/commands.py", line 233, in _wsdl2py File "build/bdist.macosx-10.3-fat/egg/ZSI/generate/wsdl2python.py", line 212, in writeClient File "build/bdist.macosx-10.3-fat/egg/ZSI/generate/wsdl2python.py", line 340, in write File "build/bdist.macosx-10.3-fat/egg/ZSI/generate/wsdl2python.py", line 361, in __str__ File "build/bdist.macosx-10.3-fat/egg/ZSI/generate/containers.py", line 271, in getvalue File "build/bdist.macosx-10.3-fat/egg/ZSI/generate/containers.py", line 974, in _setContent File "build/bdist.macosx-10.3-fat/egg/ZSI/generate/containers.py", line 1789, in getTypecodeList File "build/bdist.macosx-10.3-fat/egg/ZSI/generate/containers.py", line 1781, in _setTypecodeList File "build/bdist.macosx-10.3-fat/egg/ZSI/generate/utility.py", line 72, in getAlias ZSI.generate.WsdlGeneratorError: failed to find import for schema "http://schemas.xmlsoap.org/soap/encoding/"possibly missing @schemaLocation attribute. While I go off and dig into the idiosyncrasies of wsdl specs, thought I'd throw this out to the list to see if someone can provide a clue. thanks, Randy Modified Paths: -------------- trunk/zsi/ZSI/generate/containers.py Modified: trunk/zsi/ZSI/generate/containers.py =================================================================== --- trunk/zsi/ZSI/generate/containers.py 2007-08-07 22:56:37 UTC (rev 1412) +++ trunk/zsi/ZSI/generate/containers.py 2007-09-07 18:35:42 UTC (rev 1413) @@ -1774,7 +1774,7 @@ tc = RPCMessageTcListComponentContainer(qualified=False) tc.setOccurs(min, max, nil) tc.name = p.name - if nsuri in SCHEMA.XSD_LIST: + if nsuri in [SOAP.ENC] + SCHEMA.XSD_LIST: tpc = BTI.get_typeclass(name, nsuri) tc.klass = tpc else: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bov...@us...> - 2007-08-07 22:56:34
|
Revision: 1412 http://pywebsvcs.svn.sourceforge.net/pywebsvcs/?rev=1412&view=rev Author: boverhof Date: 2007-08-07 15:56:37 -0700 (Tue, 07 Aug 2007) Log Message: ----------- M test/wsdl2py/ServiceTest.py M test/wsdl2py/test_AWSECommerceService.py -- update targetNamespace M test/wsdl2py/servers/EchoWSAddr200403Server.py M test/wsdl2py/servers/EchoServer.py -- added some code for starting up a twisted server if we have twisted stubs -- WORKS W/TWISTED ./runTests.py local -- WORKS W/TWISTED ./runTests.py net -- FEW WORKS W/TWISTED ./runTests.py dispatch M ZSI/ServiceContainer.py M ZSI/generate/wsdl2dispatch.py M ZSI/generate/commands.py -- Added server stubs for "--twisted" to "wsdlpy" tool, -- Modified Paths: -------------- trunk/zsi/ZSI/ServiceContainer.py trunk/zsi/ZSI/generate/commands.py trunk/zsi/ZSI/generate/wsdl2dispatch.py trunk/zsi/test/wsdl2py/ServiceTest.py trunk/zsi/test/wsdl2py/servers/EchoServer.py trunk/zsi/test/wsdl2py/servers/EchoWSAddr200403Server.py trunk/zsi/test/wsdl2py/test_AWSECommerceService.py Modified: trunk/zsi/ZSI/ServiceContainer.py =================================================================== --- trunk/zsi/ZSI/ServiceContainer.py 2007-07-31 17:41:38 UTC (rev 1411) +++ trunk/zsi/ZSI/ServiceContainer.py 2007-08-07 22:56:37 UTC (rev 1412) @@ -147,9 +147,6 @@ ''' address = ('', port) sc = ServiceContainer(address, services) - #for service in services: - # path = service.getPost() - # sc.setNode(service, path) sc.serve_forever() @@ -232,7 +229,7 @@ ''' encoding = "UTF-8" - def __init__(self, post=None): + def __init__(self, post): ''' post -- POST value ''' Modified: trunk/zsi/ZSI/generate/commands.py =================================================================== --- trunk/zsi/ZSI/generate/commands.py 2007-07-31 17:41:38 UTC (rev 1411) +++ trunk/zsi/ZSI/generate/commands.py 2007-08-07 22:56:37 UTC (rev 1412) @@ -37,12 +37,6 @@ 'from %(module)s import %(metaclass)s' %kwargs ) -def SetUpTwistedClient(option, opt, value, parser, *args, **kwargs): - from ZSI.generate.containers import ServiceHeaderContainer - ServiceHeaderContainer.imports.remove('from ZSI import client') - ServiceHeaderContainer.imports.append('from ZSI.twisted import client') - - def SetUpLazyEvaluation(option, opt, value, parser, *args, **kwargs): from ZSI.generate.containers import TypecodeContainerBase TypecodeContainerBase.lazy = True @@ -101,9 +95,7 @@ # Use Twisted op.add_option("-w", "--twisted", - action="callback", callback=SetUpTwistedClient, - callback_kwargs={'module':'ZSI.generate.pyclass', - 'metaclass':'pyclass_type'}, + action="store_true", dest='twisted', default=False, help="generate a twisted.web client/server, dependencies python>=2.4, Twisted>=2.0.0, TwistedWeb>=0.5.0") op.add_option("-o", "--output-dir", @@ -164,46 +156,56 @@ return files -def wsdl2dispatch(args=None): - """Deprecated: wsdl2py now generates everything - A utility for automatically generating service skeleton code from a wsdl - definition. - """ - op = optparse.OptionParser() - op.add_option("-a", "--address", - action="store_true", dest="address", default=False, - help="ws-addressing support, must include WS-Addressing schema.") - op.add_option("-d", "--debug", - action="callback", callback=SetDebugCallback, - help="debug output") - op.add_option("-t", "--types", - action="store", dest="types", default=None, type="string", - help="Write generated files to OUTPUT_DIR") - op.add_option("-o", "--output-dir", - action="store", dest="output_dir", default=".", type="string", - help="file to load types from") - op.add_option("-s", "--simple-naming", - action="store_true", dest="simple_naming", default=False, - help="Simplify generated naming.") - - if args is None: - (options, args) = op.parse_args() - else: - (options, args) = op.parse_args(args) - - if len(args) != 1: - print>>sys.stderr, 'Expecting a file/url as argument (WSDL).' - sys.exit(os.EX_USAGE) - - reader = WSDLTools.WSDLReader() - if isfile(args[0]): - _wsdl2dispatch(options, reader.loadFromFile(args[0])) - return +#def wsdl2dispatch(args=None): +# """Deprecated: wsdl2py now generates everything +# A utility for automatically generating service skeleton code from a wsdl +# definition. +# """ +# op = optparse.OptionParser() +# op.add_option("-a", "--address", +# action="store_true", dest="address", default=False, +# help="ws-addressing support, must include WS-Addressing schema.") +# op.add_option("-d", "--debug", +# action="callback", callback=SetDebugCallback, +# help="debug output") +# op.add_option("-t", "--types", +# action="store", dest="types", default=None, type="string", +# help="Write generated files to OUTPUT_DIR") +# op.add_option("-o", "--output-dir", +# action="store", dest="output_dir", default=".", type="string", +# help="file to load types from") +# op.add_option("-s", "--simple-naming", +# action="store_true", dest="simple_naming", default=False, +# help="Simplify generated naming.") +# +# if args is None: +# (options, args) = op.parse_args() +# else: +# (options, args) = op.parse_args(args) +# +# if len(args) != 1: +# print>>sys.stderr, 'Expecting a file/url as argument (WSDL).' +# sys.exit(os.EX_USAGE) +# +# reader = WSDLTools.WSDLReader() +# if isfile(args[0]): +# _wsdl2dispatch(options, reader.loadFromFile(args[0])) +# return +# +# _wsdl2dispatch(options, reader.loadFromURL(args[0])) - _wsdl2dispatch(options, reader.loadFromURL(args[0])) +def _wsdl2py(options, wsdl): -def _wsdl2py(options, wsdl): + if options.twisted: + from ZSI.generate.containers import ServiceHeaderContainer + try: + ServiceHeaderContainer.imports.remove('from ZSI import client') + except ValueError: + pass + ServiceHeaderContainer.imports.append('from ZSI.twisted import client') + + if options.simple_naming: # Use a different client suffix # WriteServiceModule.client_module_suffix = "_client" @@ -242,17 +244,21 @@ def _wsdl2dispatch(options, wsdl): -# if options.simple_naming: -# ServiceDescription.server_module_suffix = '_interface' -# ServiceDescription.func_aname = lambda instnc,n: TextProtect(n) -# ServiceDescription.separate_messages = True -# # use module names rather than their number. -# utility.namespace_name = lambda cls, ns: utility.Namespace2ModuleName(ns) - - if options.address is True: - ss = ServiceDescriptionWSA() + """TOOD: Remove ServiceContainer stuff, and replace with WSGI. + """ + kw = dict() + if options.twisted: + from ZSI.twisted.WSresource import WSResource + kw['base'] = WSResource + ss = ServiceDescription(**kw) + if options.address is True: + raise RuntimeError, 'WS-Address w/twisted currently unsupported, edit the "factory" attribute by hand' else: - ss = ServiceDescription() + # TODO: make all this handler arch + if options.address is True: + ss = ServiceDescriptionWSA() + else: + ss = ServiceDescription(**kw) ss.fromWSDL(wsdl) file_name = ss.getServiceModuleName()+'.py' Modified: trunk/zsi/ZSI/generate/wsdl2dispatch.py =================================================================== --- trunk/zsi/ZSI/generate/wsdl2dispatch.py 2007-07-31 17:41:38 UTC (rev 1411) +++ trunk/zsi/ZSI/generate/wsdl2dispatch.py 2007-08-07 22:56:37 UTC (rev 1412) @@ -1,4 +1,5 @@ #!/usr/bin/env python +import inspect from cStringIO import StringIO import ZSI, string, sys, getopt, urlparse, types, warnings from ZSI.wstools import WSDLTools @@ -45,11 +46,16 @@ ''' parameters: base -- either a class definition, or a str representing a qualified - class name. + class name (eg. module.name.classname) prefix -- method prefix. ''' + if inspect.isclass(base): + self.base_class_name = base.__name__ + self.base_module_name = inspect.getmodule(base).__name__ + else: + self.base_module_name, self.base_class_name = base.rsplit('.', 1) + self.wsdl = None - self.base_class = base self.method_prefix = prefix self._service_class = SOAPService @@ -61,26 +67,6 @@ self.types_module_name = None self.messages_module_name = None - def _getBaseClassName(self): - '''return base class name, do not override. - ''' - if self.base_class is None: - return - if type(self.base_class) is types.ClassType: - return self.base_class.__name__ - return rsplit(self.base_class, '.')[-1] - - def _getBaseClassModule(self): - '''return base class module, do not override. - ''' - if self.base_class is None: - return - if type(self.base_class) is types.ClassType: - return self.base_class.__module__ - if self.base_class.find('.') >= 0: - return rsplit(self.base_class, '.')[0] - return - def reset(self): self.header = StringIO() self.imports = StringIO() @@ -119,16 +105,6 @@ wsm = WriteServiceModule(self.wsdl) return wsm.getTypesModuleName() -# def getMessagesModuleName(self): -# '''return module name. -# ''' -# assert self.wsdl is not None, 'initialize, call fromWSDL' -# if self.messages_module_name is not None: -# return self.messages_module_name -# -# wsm = WriteServiceModule(self.wsdl) -# return wsm.getMessagesModuleName() - def getServiceModuleName(self): '''return module name. ''' @@ -158,12 +134,9 @@ 'expecting WSDLTools.Service instance.' s = self._services[service.name].classdef - base = self._getBaseClassName() - if base is None: - print >>s, 'class %s:' %(self.getClassName(service.name)) - else: - print >>s, 'class %s(%s):' %(self.getClassName(service.name), base) + print >>s, 'class %s(%s):' %(self.getClassName(service.name), self.base_class_name) + print >>s, '%ssoapAction = {}' % self.getIndent(level=1) print >>s, '%sroot = {}' % self.getIndent(level=1) @@ -173,16 +146,6 @@ i = self.imports print >>i, 'from ZSI.schema import GED, GTD' print >>i, 'from ZSI.TCcompound import ComplexType, Struct' -# if path is None: -# if self.separate_messages: -# print >>i, 'from %s import *' %self.getMessagesModuleName() -# else: -# print >>i, 'from %s import *' %self.getClientModuleName() -# else: -# if self.separate_messages: -# print >>i, 'from %s.%s import *' %(path, self.getMessagesModuleName()) -# else: -# print >>i, 'from %s.%s import *' %(path, self.getClientModuleName()) module = self.getTypesModuleName() package = self.getTypesModulePath() @@ -191,14 +154,7 @@ print >>i, 'from %s import *' %(module) - mod = self._getBaseClassModule() - name = self._getBaseClassName() - if mod is None and name is None: - pass - elif mod is None: - print >>i, 'import %s' %name - else: - print >>i, 'from %s import %s' %(mod, name) + print >>i, 'from %s import %s' %(self.base_module_name, self.base_class_name) def setUpInitDef(self, service): '''set __init__ function @@ -215,10 +171,14 @@ else: print >>d, '%sdef __init__(self, post, **kw):' %self.getIndent(level=1) - base = self._getBaseClassName() - if base is not None: - print >>d, '%s%s.__init__(self, post)' %(self.getIndent(level=2), base) + # Require POST initialization value for test implementation + if self.base_module_name == inspect.getmodule(ServiceSOAPBinding).__name__: + print >>d, '%s%s.__init__(self, post)' %(self.getIndent(level=2), self.base_class_name) + return + # No POST initialization value, obtained from HTTP Request in twisted or wsgi + print >>d, '%s%s.__init__(self)' %(self.getIndent(level=2), self.base_class_name) + def mangle(self, name): return TextProtect(name) @@ -261,7 +221,7 @@ method_name = self.getMethodName(op.name) m = sd.newMethod() - print >>m, '%sdef %s(self, ps):' %(self.getIndent(level=1), method_name) + print >>m, '%sdef %s(self, ps, **kw):' %(self.getIndent(level=1), method_name) if msgin is not None: print >>m, '%srequest = ps.Parse(%s.typecode)' %(self.getIndent(level=2), msgin_name) else: @@ -392,8 +352,7 @@ 'expecting WSDLTools.Service instance' s = self._services[service.name].classdef - print >>s, 'class %s(%s):' %(self.getClassName(service.name), - self._getBaseClassName()) + print >>s, 'class %s(%s):' %(self.getClassName(service.name), self.base_class_name) print >>s, '%ssoapAction = {}' % self.getIndent(level=1) print >>s, '%swsAction = {}' % self.getIndent(level=1) print >>s, '%sroot = {}' % self.getIndent(level=1) Modified: trunk/zsi/test/wsdl2py/ServiceTest.py =================================================================== --- trunk/zsi/test/wsdl2py/ServiceTest.py 2007-07-31 17:41:38 UTC (rev 1411) +++ trunk/zsi/test/wsdl2py/ServiceTest.py 2007-08-07 22:56:37 UTC (rev 1412) @@ -83,7 +83,7 @@ except: print >>sys.stderr, 'error executing: %s' %cmd raise - time.sleep(1) + time.sleep(3) return process Modified: trunk/zsi/test/wsdl2py/servers/EchoServer.py =================================================================== --- trunk/zsi/test/wsdl2py/servers/EchoServer.py 2007-07-31 17:41:38 UTC (rev 1411) +++ trunk/zsi/test/wsdl2py/servers/EchoServer.py 2007-08-07 22:56:37 UTC (rev 1412) @@ -4,24 +4,85 @@ # See LBNLCopyright for copyright notice! ########################################################################### import sys -from ZSI.ServiceContainer import AsServer +from ZSI import ServiceContainer, Fault +from ZSI.ServiceContainer import AsServer, ServiceSOAPBinding from EchoServer_server import EchoServer -""" -EchoServer example service +from ZSI.fault import Fault, ZSIFaultDetail +def WSDLFaultFromException(ex, inheader, tb=None, actor=None): + '''Return a Fault object created from a Python exception. -WSDL: ../../samples/Echo/Echo.wsdl + <SOAP-ENV:Fault> + <faultcode>SOAP-ENV:Server</faultcode> + <faultstring>Processing Failure</faultstring> + <detail> + <ZSI:FaultDetail> + <ZSI:string></ZSI:string> + <ZSI:trace></ZSI:trace> + </ZSI:FaultDetail> + </detail> + </SOAP-ENV:Fault> + ''' + tracetext = None + if tb: + try: + lines = '\n'.join(['%s:%d:%s' % (name, line, func) + for name, line, func, text in traceback.extract_tb(tb)]) + except: + pass + else: + tracetext = lines -""" + exceptionName = "" + try: + exceptionName = ":".join([ex.__module__, ex.__class__.__name__]) + except: pass + if isinstance(ex, Fault): + return ex + elt = ZSIFaultDetail(string=exceptionName + "\n" + str(ex), trace=tracetext) + if inheader: + detail, headerdetail = None, elt + else: + detail, headerdetail = elt, None + return Fault(Fault.Server, 'Processing Failure', + actor, detail, headerdetail) + +ServiceContainer.FaultFromException = WSDLFaultFromException + class Service(EchoServer): - def soap_Echo(self, ps): - request,response = EchoServer.soap_Echo(self, ps) + def soap_Echo(self, ps, **kw): + request,response = EchoServer.soap_Echo(self, ps, **kw) response.EchoResult = request.EchoIn + #return request,response + #raise RuntimeError, 'hi' + #raise Fault(911, "EMERGENCY", None, response) return request,response +def twisted_main(port): + from twisted.internet import reactor + from twisted.application import service, internet + from twisted.web.resource import Resource + from twisted.web.server import Site + + root = Resource() + root.putChild('test', Service()) + reactor.listenTCP(port, Site(root)) + +def main(): + port = int(sys.argv[1]) + if issubclass(EchoServer, ServiceSOAPBinding): + AsServer(port, (Service('test'),)) + return + + #from ZSI.twisted.WSresource import WSResource + #if issubclass(EchoServer, WSResource): + from twisted.internet import reactor + reactor.callWhenRunning(twisted_main, port) + reactor.run() + + if __name__ == "__main__" : - port = int(sys.argv[1]) - AsServer(port, (Service('test'),)) + main() Modified: trunk/zsi/test/wsdl2py/servers/EchoWSAddr200403Server.py =================================================================== --- trunk/zsi/test/wsdl2py/servers/EchoWSAddr200403Server.py 2007-07-31 17:41:38 UTC (rev 1411) +++ trunk/zsi/test/wsdl2py/servers/EchoWSAddr200403Server.py 2007-08-07 22:56:37 UTC (rev 1412) @@ -19,13 +19,13 @@ class WSAService(EchoServer): - def wsa_Echo(self, ps, addr): - request,response = EchoServer.wsa_Echo(self, ps, addr) + def wsa_Echo(self, ps, address): + request,response = EchoServer.wsa_Echo(self, ps, address) response.EchoResult = request.EchoIn if isinstance(response.EchoResult, EndpointReferenceType): addr1 = response.EchoResult - for a in addr.Any: + for a in address.Any: if a not in addr1.ReferenceProperties.Any: raise RuntimeError, 'EPRs dont match' Modified: trunk/zsi/test/wsdl2py/test_AWSECommerceService.py =================================================================== --- trunk/zsi/test/wsdl2py/test_AWSECommerceService.py 2007-07-31 17:41:38 UTC (rev 1411) +++ trunk/zsi/test/wsdl2py/test_AWSECommerceService.py 2007-08-07 22:56:37 UTC (rev 1412) @@ -42,7 +42,7 @@ return suite -TargetNamespace = "http://webservices.amazon.com/AWSECommerceService/2007-06-13" +TargetNamespace = 'http://webservices.amazon.com/AWSECommerceService/2007-07-16' class AmazonTestCase(ServiceTestCase): """Test case for Amazon ECommerce Web service """ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <eo...@us...> - 2007-07-31 17:41:38
|
Revision: 1411 http://pywebsvcs.svn.sourceforge.net/pywebsvcs/?rev=1411&view=rev Author: eolson Date: 2007-07-31 10:41:38 -0700 (Tue, 31 Jul 2007) Log Message: ----------- Update wstools path in the svn:externals property to reflect the svn path change at sourceforge. Property Changed: ---------------- branches/ZSI_v2_0_0/ZSI/ Property changes on: branches/ZSI_v2_0_0/ZSI ___________________________________________________________________ Name: svn:externals - wstools https://svn.sourceforge.net/svnroot/pywebsvcs/trunk/wstools + wstools https://pywebsvcs.svn.sourceforge.net/svnroot/pywebsvcs/trunk/wstools This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |