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: <wa...@us...> - 2003-03-25 17:02:33
|
Update of /cvsroot/pywebsvcs/SOAPpy/SOAPpy In directory sc8-pr-cvs1:/tmp/cvs-serv10079 Modified Files: SOAP.py Log Message: - Unnamed arguments which were lists were being incorrectly given the name 'Result'. Index: SOAP.py =================================================================== RCS file: /cvsroot/pywebsvcs/SOAPpy/SOAPpy/SOAP.py,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- SOAP.py 8 Mar 2003 05:07:48 -0000 1.17 +++ SOAP.py 25 Mar 2003 17:02:26 -0000 1.18 @@ -97,7 +97,7 @@ ident = '$Id$' -__version__ = "0.9.7" +__version__ = "0.9.8" # Platform hackery @@ -3069,6 +3069,8 @@ if type(tag) not in (NoneType, StringType, UnicodeType): raise KeyError, "tag must be a string or None" + tag = tag or self.gentag() + try: meth = getattr(self, "dump_" + type(obj).__name__) meth(obj, tag, typed, ns_map) @@ -3386,7 +3388,7 @@ ################################################################################ def SOAPUserAgent(): - return "SOAP.py " + __version__ + " (actzero.com)" + return "SOAP.py " + __version__ + " (pywebsvcs.sf.net)" ################################################################################ # Client |
From: <bl...@us...> - 2003-03-25 05:16:26
|
Update of /cvsroot/pywebsvcs/zsi/doc In directory sc8-pr-cvs1:/tmp/cvs-serv18585 Modified Files: c06-tc.tex Log Message: added note about the use of dates and times in your TypeCode definition. the first classes i saw (Gregorian and Duration) seemed to make sense to use, but they are actually for internal use only and do not have any parse or serialize methods. hopefully this note will help out the next guy who makes the same mistake i made. Index: c06-tc.tex =================================================================== RCS file: /cvsroot/pywebsvcs/zsi/doc/c06-tc.tex,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- c06-tc.tex 24 Jan 2002 20:10:48 -0000 1.5 +++ c06-tc.tex 25 Mar 2003 05:16:20 -0000 1.6 @@ -474,6 +474,12 @@ the first six values are taken directly as year, month, day, hour, minute, second in UTC. +\item +Although the classes \class{Duration} and \class{Gregorian} are defined, they +are for internal use only and should not be included in any \class{TypeCode} +you define. Instead, use the classes beginning with a lower case g in your +typecodes. + \end{enumerate} In addition, badly-formed values may result in non-sensical serializations. |
From: <bl...@us...> - 2003-03-25 04:13:07
|
Update of /cvsroot/pywebsvcs/zsi In directory sc8-pr-cvs1:/tmp/cvs-serv32147 Modified Files: CHANGES Log Message: added entry for change in TCtimes return type (it's now a tuple and not a list) Index: CHANGES =================================================================== RCS file: /cvsroot/pywebsvcs/zsi/CHANGES,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- CHANGES 18 Mar 2003 05:07:30 -0000 1.20 +++ CHANGES 25 Mar 2003 04:13:04 -0000 1.21 @@ -5,6 +5,7 @@ - TypeCode enabled classes now support parameters in the constructor - Automatic parsing of ComplexTypes in response messages - WSDL Parsing and operation invocation via ServiceProxy + - Tuple returned from dates and times (instead of a list) Changes for 1.3, released xx-May-2002: - Fixed parsing bug evidenced by dW article |
From: <bl...@us...> - 2003-03-25 04:12:23
|
Update of /cvsroot/pywebsvcs/zsi/ZSI In directory sc8-pr-cvs1:/tmp/cvs-serv31971 Modified Files: TCtimes.py Log Message: changed _dict_to_tuple to return a tuple as opposed to a dict. this is for consistency with the python time tuple pattern. Index: TCtimes.py =================================================================== RCS file: /cvsroot/pywebsvcs/zsi/ZSI/TCtimes.py,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- TCtimes.py 19 Mar 2003 06:40:45 -0000 1.7 +++ TCtimes.py 25 Mar 2003 04:12:20 -0000 1.8 @@ -34,7 +34,7 @@ retval[4] -= m if d.get('neg', 0): retval[0:5] = map(operator.__neg__, retval[0:5]) - return retval + return tuple(retval) |
From: <bl...@us...> - 2003-03-25 04:11:49
|
Update of /cvsroot/pywebsvcs/zsi/ZSI/wsdl In directory sc8-pr-cvs1:/tmp/cvs-serv31783 Modified Files: ServiceProxy.py Log Message: fixed pretty basic bug where the soap url returned for an operation uses the default port (80) and thus does not include a : mark. Index: ServiceProxy.py =================================================================== RCS file: /cvsroot/pywebsvcs/zsi/ZSI/wsdl/ServiceProxy.py,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- ServiceProxy.py 21 Mar 2003 16:31:25 -0000 1.2 +++ ServiceProxy.py 25 Mar 2003 04:11:46 -0000 1.3 @@ -267,7 +267,7 @@ url = callinfo.location (protocol, host, uri, query, fragment, identifier) = urlparse(url) port = 80 - if host.find(':'): + if host.find(':') >= 0: host, port = host.split(':') params = callinfo.getInParameters() @@ -277,7 +277,7 @@ port=port, url=uri) apply(getattr(binding, callinfo.methodName), '') - #print binding.ReceiveRaw() + #print binding.ReceiveRaw() return binding.Receive() |
Update of /cvsroot/pywebsvcs/zsi/ZSI/wsdl In directory sc8-pr-cvs1:/tmp/cvs-serv7890 Modified Files: ServiceProxy.py Utility.py WSDLTools.py XMLSchema.py Removed Files: SOAPCallInfo.py Transports.py XMLWriter.py Log Message: Simplify code: -Remove toXML methods, and WSDLWriter class. -Remove SMTP transport, since only use of Transports is for WSDL reading. Should remove timeout stuff altogether and use Python's current URL library. -Merge some smaller files into the only place they're used. Index: ServiceProxy.py =================================================================== RCS file: /cvsroot/pywebsvcs/zsi/ZSI/wsdl/ServiceProxy.py,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- ServiceProxy.py 18 Mar 2003 05:04:08 -0000 1.1 +++ ServiceProxy.py 21 Mar 2003 16:31:25 -0000 1.2 @@ -7,13 +7,232 @@ # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS # FOR A PARTICULAR PURPOSE. -from SOAPCallInfo import callInfoFromWSDL -from WSDLTools import WSDLReader from urlparse import urlparse from ZSI import * from ZSI.client import * import weakref +from Utility import DOM +import WSDLTools + + +class SOAPCallInfo: + """SOAPCallInfo captures the important binding information about a + SOAP operation, in a structure that is easier to work with than + raw WSDL structures.""" + + def __init__(self, methodName): + self.methodName = methodName + self.inheaders = [] + self.outheaders = [] + self.inparams = [] + self.outparams = [] + self.retval = None + + encodingStyle = DOM.NS_SOAP_ENC + documentation = '' + soapAction = None + transport = None + namespace = None + location = None + use = 'encoded' + style = 'rpc' + + def addInParameter(self, name, type, namespace=None, element_type=0): + """Add an input parameter description to the call info.""" + parameter = ParameterInfo(name, type, namespace, element_type) + self.inparams.append(parameter) + return parameter + + def addOutParameter(self, name, type, namespace=None, element_type=0): + """Add an output parameter description to the call info.""" + parameter = ParameterInfo(name, type, namespace, element_type) + self.outparams.append(parameter) + return parameter + + def setReturnParameter(self, name, type, namespace=None, element_type=0): + """Set the return parameter description for the call info.""" + parameter = ParameterInfo(name, type, namespace, element_type) + self.retval = parameter + return parameter + + def addInHeaderInfo(self, name, type, namespace, element_type=0, + mustUnderstand=0): + """Add an input SOAP header description to the call info.""" + headerinfo = HeaderInfo(name, type, namespace, element_type) + if mustUnderstand: + headerinfo.mustUnderstand = 1 + self.inheaders.append(headerinfo) + return headerinfo + + def addOutHeaderInfo(self, name, type, namespace, element_type=0, + mustUnderstand=0): + """Add an output SOAP header description to the call info.""" + headerinfo = HeaderInfo(name, type, namespace, element_type) + if mustUnderstand: + headerinfo.mustUnderstand = 1 + self.outheaders.append(headerinfo) + return headerinfo + + def getInParameters(self): + """Return a sequence of the in parameters of the method.""" + return self.inparams + + def getOutParameters(self): + """Return a sequence of the out parameters of the method.""" + return self.outparams + + def getReturnParameter(self): + """Return param info about the return value of the method.""" + return self.retval + + def getInHeaders(self): + """Return a sequence of the in headers of the method.""" + return self.inheaders + + def getOutHeaders(self): + """Return a sequence of the out headers of the method.""" + return self.outheaders + + +class ParameterInfo: + """A ParameterInfo object captures parameter binding information.""" + def __init__(self, name, type, namespace=None, element_type=0): + if element_type: + self.element_type = 1 + if namespace is not None: + self.namespace = namespace + self.name = name + self.type = type + + element_type = 0 + namespace = None + default = None + + +class HeaderInfo(ParameterInfo): + """A HeaderInfo object captures SOAP header binding information.""" + def __init__(self, name, type, namespace, element_type=None): + ParameterInfo.__init__(self, name, type, namespace, element_type) + + mustUnderstand = 0 + actor = None + + +def callInfoFromWSDL(port, name): + """Return a SOAPCallInfo given a WSDL port and operation name.""" + wsdl = port.getService().getWSDL() + binding = port.getBinding() + portType = binding.getPortType() + operation = portType.operations[name] + opbinding = binding.operations[name] + messages = wsdl.messages + callinfo = SOAPCallInfo(name) + + addrbinding = port.getAddressBinding() + if not isinstance(addrbinding, WSDLTools.SoapAddressBinding): + raise ValueError, 'Unsupported binding type.' + callinfo.location = addrbinding.location + + soapbinding = binding.findBinding(WSDLTools.SoapBinding) + if soapbinding is None: + raise ValueError, 'Missing soap:binding element.' + callinfo.transport = soapbinding.transport + callinfo.style = soapbinding.style or 'document' + + soap_op_binding = opbinding.findBinding(WSDLTools.SoapOperationBinding) + if soap_op_binding is not None: + callinfo.soapAction = soap_op_binding.soapAction + callinfo.style = soap_op_binding.style or callinfo.style + + parameterOrder = operation.parameterOrder + + if operation.input is not None: + message = messages[operation.input.message] + msgrole = opbinding.input + + mime = msgrole.findBinding(WSDLTools.MimeMultipartRelatedBinding) + if mime is not None: + raise ValueError, 'Mime bindings are not supported.' + else: + for item in msgrole.findBindings(WSDLTools.SoapHeaderBinding): + part = messages[item.message].parts[item.part] + header = callinfo.addInHeaderInfo( + part.name, + part.element or part.type, + item.namespace, + element_type = part.element and 1 or 0 + ) + header.encodingStyle = item.encodingStyle + + body = msgrole.findBinding(WSDLTools.SoapBodyBinding) + if body is None: + raise ValueError, 'Missing soap:body binding.' + callinfo.encodingStyle = body.encodingStyle + callinfo.namespace = body.namespace + callinfo.use = body.use + + if body.parts is not None: + parts = [] + for name in body.parts: + parts.append(message.parts[name]) + else: + parts = message.parts.values() + + for part in parts: + callinfo.addInParameter( + part.name, + part.element or part.type, + element_type = part.element and 1 or 0 + ) + + if operation.output is not None: + message = messages[operation.output.message] + msgrole = opbinding.output + + mime = msgrole.findBinding(WSDLTools.MimeMultipartRelatedBinding) + if mime is not None: + raise ValueError, 'Mime bindings are not supported.' + else: + for item in msgrole.findBindings(WSDLTools.SoapHeaderBinding): + part = messages[item.message].parts[item.part] + header = callinfo.addOutHeaderInfo( + part.name, + part.element or part.type, + item.namespace, + element_type = part.element and 1 or 0 + ) + header.encodingStyle = item.encodingStyle + + body = msgrole.findBinding(WSDLTools.SoapBodyBinding) + if body is None: + raise ValueError, 'Missing soap:body binding.' + callinfo.encodingStyle = body.encodingStyle + callinfo.namespace = body.namespace + callinfo.use = body.use + + if body.parts is not None: + parts = [] + for name in body.parts: + parts.append(message.parts[name]) + else: + parts = message.parts.values() + + if parts: + callinfo.setReturnParameter( + parts[0].name, + parts[0].element or parts[0].type, + element_type = parts[0].element and 1 or 0 + ) + for part in parts[1:]: + callinfo.addOutParameter( + part.name, + part.element or part.type, + element_type = part.element and 1 or 0 + ) + + return callinfo + class ServiceProxy: """A ServiceProxy provides a convenient way to call a remote web @@ -22,7 +241,7 @@ def __init__(self, wsdl, service=None, port=None): if not hasattr(wsdl, 'targetNamespace'): - wsdl = WSDLReader().loadFromURL(wsdl) + wsdl = WSDLTools.WSDLReader().loadFromURL(wsdl) # for item in wsdl.types.items(): # self._serializer.loadSchema(item) self._service = wsdl.services[service or 0] Index: Utility.py =================================================================== RCS file: /cvsroot/pywebsvcs/zsi/ZSI/wsdl/Utility.py,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Utility.py 18 Mar 2003 05:04:08 -0000 1.1 +++ Utility.py 21 Mar 2003 16:31:25 -0000 1.2 @@ -10,9 +10,110 @@ from string import join, strip, split from UserDict import UserDict from StringIO import StringIO -from Transports import urlopen import xml.dom.minidom, weakref +import string, httplib, smtplib, urllib, socket +from TimeoutSocket import TimeoutSocket, TimeoutError +from StringIO import StringIO +from urlparse import urlparse +from httplib import HTTPConnection, HTTPSConnection + +class HTTPResponse: + """Captures the information in an HTTP response message.""" + + def __init__(self, response): + self.status = response.status + self.reason = response.reason + self.headers = response.msg + self.body = response.read() or None + response.close() + +class TimeoutHTTP(HTTPConnection): + """A custom http connection object that supports socket timeout.""" + def __init__(self, host, port=None, timeout=20): + HTTPConnection.__init__(self, host, port) + self.timeout = timeout + + def connect(self): + self.sock = TimeoutSocket(self.timeout) + self.sock.connect((self.host, self.port)) + + +class TimeoutHTTPS(HTTPSConnection): + """A custom https object that supports socket timeout. Note that this + is not really complete. The builtin SSL support in the Python socket + module requires a real socket (type) to be passed in to be hooked to + SSL. That means our fake socket won't work and our timeout hacks are + bypassed for send and recv calls. Since our hack _is_ in place at + connect() time, it should at least provide some timeout protection.""" + def __init__(self, host, port=None, timeout=20, **kwargs): + if not hasattr(socket, 'ssl'): + raise ValueError( + 'This Python installation does not have SSL support.' + ) + HTTPSConnection.__init__(self, str(host), port, **kwargs) + self.timeout = timeout + + def connect(self): + sock = TimeoutSocket(self.timeout) + sock.connect((self.host, self.port)) + realsock = getattr(sock.sock, '_sock', sock.sock) + ssl = socket.ssl(realsock, self.key_file, self.cert_file) + self.sock = httplib.FakeSocket(sock, ssl) + +def urlopen(url, timeout=20, redirects=None): + """A minimal urlopen replacement hack that supports timeouts for http. + Note that this supports GET only.""" + scheme, host, path, params, query, frag = urlparse(url) + if not scheme in ('http', 'https'): + return urllib.urlopen(url) + if params: path = '%s;%s' % (path, params) + if query: path = '%s?%s' % (path, query) + if frag: path = '%s#%s' % (path, frag) + + if scheme == 'https': + if not hasattr(socket, 'ssl'): + raise ValueError( + 'This Python installation does not have SSL support.' + ) + conn = TimeoutHTTPS(host, None, timeout) + else: + conn = TimeoutHTTP(host, None, timeout) + + conn.putrequest('GET', path) + conn.putheader('Connection', 'close') + conn.endheaders() + response = None + while 1: + response = conn.getresponse() + if response.status != 100: + break + conn._HTTPConnection__state = httplib._CS_REQ_SENT + conn._HTTPConnection__response = None + + status = response.status + + # If we get an HTTP redirect, we will follow it automatically. + if status >= 300 and status < 400: + location = response.msg.getheader('location') + if location is not None: + response.close() + if redirects is not None and redirects.has_key(location): + raise RecursionError( + 'Circular HTTP redirection detected.' + ) + if redirects is None: + redirects = {} + redirects[location] = 1 + return urlopen(location, timeout, redirects) + raise HTTPResponse(response) + + if not (status >= 200 and status < 300): + raise HTTPResponse(response) + + body = StringIO(response.read()) + response.close() + return body class DOM: """The DOM singleton defines a number of XML related constants and @@ -325,17 +426,6 @@ if preserve_ws is None: value = strip(value) return value - - def elementToStream(self, element, stream, format=0): - """Write the xml representation of an element to a stream.""" - if format: element.writexml(stream, '', ' ', '\n') - else: element.writexml(stream) - return stream - - def elementToString(self, element, format=0): - """Return an xml string representation of an element.""" - method = format and element.toprettyxml or element.toxml - return method() def findNamespaceURI(self, prefix, node): """Find a namespace uri given a prefix and a context node.""" Index: WSDLTools.py =================================================================== RCS file: /cvsroot/pywebsvcs/zsi/ZSI/wsdl/WSDLTools.py,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- WSDLTools.py 18 Mar 2003 05:04:08 -0000 1.1 +++ WSDLTools.py 21 Mar 2003 16:31:25 -0000 1.2 @@ -1,1376 +1,971 @@ -# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved. -# -# This software is subject to the provisions of the Zope Public License, -# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution. -# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED -# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS -# FOR A PARTICULAR PURPOSE. - -from Utility import DOM, Collection -from XMLSchema import XMLSchema [...2316 lines suppressed...] + for item in object.extensions: + if isinstance(item, kind): + result.append(item) + return result + +def FindExtension(object, kind, t_type=type(())): + if isinstance(kind, t_type): + namespaceURI, name = kind + for item in object.extensions: + if not hasattr(item, 'nodeType'): + continue + if DOM.nsUriMatch(namespaceURI, item.namespaceURI) and \ + item.name == name: + return item + else: + for item in object.extensions: + if isinstance(item, kind): + return item + return None + Index: XMLSchema.py =================================================================== RCS file: /cvsroot/pywebsvcs/zsi/ZSI/wsdl/XMLSchema.py,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- XMLSchema.py 18 Mar 2003 05:04:08 -0000 1.1 +++ XMLSchema.py 21 Mar 2003 16:31:25 -0000 1.2 @@ -48,11 +48,6 @@ self.targetNamespace = DOM.getAttr(element, 'targetNamespace') self.element = element - def toXML(self, writer): - strval = DOM.elementToString(self.element) - writer.writeXML(strval) - - class realXMLSchema: """A schema is a collection of schema components derived from one or more schema documents, that is, one or more <schema> element --- SOAPCallInfo.py DELETED --- --- Transports.py DELETED --- --- XMLWriter.py DELETED --- |
From: <rs...@us...> - 2003-03-19 20:15:03
|
Update of /cvsroot/pywebsvcs/zsi/doc In directory sc8-pr-cvs1:/tmp/cvs-serv19290 Modified Files: zsi.tex Log Message: Remove Brian as an author. Increase his acknowledgement (since we actually use his content :), and credit Zope per the agreement Rich made with him. Index: zsi.tex =================================================================== RCS file: /cvsroot/pywebsvcs/zsi/doc/zsi.tex,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- zsi.tex 19 Mar 2003 19:46:58 -0000 1.9 +++ zsi.tex 19 Mar 2003 20:14:58 -0000 1.10 @@ -1,17 +1,15 @@ % $Header$ +\def\ZSI{\module{ZSI}} \documentclass{manual} \title{ZSI: The Zolera Soap Infrastructure} -\author{Rich Salz\\ - Brian Lloyd\\ +\author{Rich Salz,\\ Christopher Blunck} \authoraddress{ \strong{DataPower Technology, \url{http://www.datapower.com}}\\ -\strong{Zope Corporation, \url{http://www.zope.com}}\\ E-mail: \email{rs...@da...\\ -br...@zo...\\ bl...@gs...} } -\date{\today} +\date{March 19, 2003}% edited date, not printed date \input{version} \begin{document} @@ -20,24 +18,23 @@ \centerline{\strong{ABSTRACT}} -\module{ZSI}, the Zolera SOAP Infrastructure, is a Python package that +\ZSI{}, the Zolera SOAP Infrastructure, is a Python package that provides an implementation of SOAP messaging, as described in \citetitle[http://www.w3.org/TR/soap]{The SOAP 1.1 Specification}. -In particular, \module{ZSI} parses and generates SOAP messages, and +In particular, \ZSI{} parses and generates SOAP messages, and converts between native Python datatypes and SOAP syntax. It can also be used to build applications using \citetitle[http://www.w3.org/TR/SOAP-attachments]{SOAP Messages with Attachments}. -\module{ZSI} is ``transport neutral'', and provides only a simple +\ZSI{} is ``transport neutral'', and provides only a simple I/O and dispatch framework; a more complete solution is the -responsibility of the application using \module{ZSI}. +responsibility of the application using \ZSI{}. As usage patterns emerge, and common application frameworks are more understood, this may change. -\module{ZSI} requires Python 2.0 or later and PyXML version 0.6.6 or later. +\ZSI{} requires Python 2.0 or later and PyXML version 0.6.6 or later. -The \module{ZSI} homepage is at -\url{http://pywebsvcs.sf.net/}. +The \ZSI{} homepage is at \url{http://pywebsvcs.sf.net/}. \vfill @@ -46,6 +43,9 @@ Copyright \copyright{} 2001, Zolera Systems, Inc.\\ All Rights Reserved. +Copyright \copyright{} 2002-2003, Rich Salz.\\ +All Rights Reserved. + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation @@ -80,11 +80,13 @@ Frederick Lundh for his \code{soaplib} package (see \url{http://www.secretlabs.com/downloads/index.htm\#soap}), Cayce Ullman and Brian Matthews for their \code{SOAP.py} package -(see \url{http://sourceforge.net/projects/pywebsvcs}), -and Brian Lloyd for his numerous WSDL contributions. +(see \url{http://sourceforge.net/projects/pywebsvcs}). + +We are particularly grateful to Brian Lloyd and the Zope Corporation +(\url{http://www.zope.com}) for letting us incorporate his ZOPE +WebServices package and documentation into \ZSI{}. \tableofcontents{} -\def\ZSI{\module{ZSI}} \input{c01-intro} \input{c02-samples} |
From: <bl...@us...> - 2003-03-19 19:47:02
|
Update of /cvsroot/pywebsvcs/zsi/doc In directory sc8-pr-cvs1:/tmp/cvs-serv6493 Modified Files: zsi.tex Log Message: added Brian Lloyd and Christopher Blunck as authors. added acknowledgement to brian lloyd for his wsdl contributions. this may need re-formatting - it looks kind of bulky when translated to html Index: zsi.tex =================================================================== RCS file: /cvsroot/pywebsvcs/zsi/doc/zsi.tex,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- zsi.tex 19 Mar 2003 19:14:47 -0000 1.8 +++ zsi.tex 19 Mar 2003 19:46:58 -0000 1.9 @@ -1,12 +1,17 @@ % $Header$ \documentclass{manual} \title{ZSI: The Zolera Soap Infrastructure} -\author{Rich Salz} +\author{Rich Salz\\ + Brian Lloyd\\ + Christopher Blunck} \authoraddress{ -DataPower Technology, \url{http://www.datapower.com}\\ -E-mail: \email{rs...@da...}\\ +\strong{DataPower Technology, \url{http://www.datapower.com}}\\ +\strong{Zope Corporation, \url{http://www.zope.com}}\\ +E-mail: \email{rs...@da...\\ +br...@zo...\\ +b...@gs...} } -\date{March 12, 2003} +\date{\today} \input{version} \begin{document} @@ -74,8 +79,9 @@ mailing list (see \url{http://groups.yahoo.com/soapbuilders}), Frederick Lundh for his \code{soaplib} package (see \url{http://www.secretlabs.com/downloads/index.htm\#soap}), -and Cayce Ullman and Brian Matthews for their \code{SOAP.py} package -(see \url{http://sourceforge.net/projects/pywebsvcs}). +Cayce Ullman and Brian Matthews for their \code{SOAP.py} package +(see \url{http://sourceforge.net/projects/pywebsvcs}), +and Brian Lloyd for his numerous WSDL contributions. \tableofcontents{} \def\ZSI{\module{ZSI}} |
From: <bl...@us...> - 2003-03-19 19:15:29
|
Update of /cvsroot/pywebsvcs/zsi/doc In directory sc8-pr-cvs1:/tmp/cvs-serv23835 Modified Files: c02-samples.tex Log Message: re-organized (slightly). added some more examples Index: c02-samples.tex =================================================================== RCS file: /cvsroot/pywebsvcs/zsi/doc/c02-samples.tex,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- c02-samples.tex 13 Mar 2003 03:11:04 -0000 1.3 +++ c02-samples.tex 19 Mar 2003 19:15:25 -0000 1.4 @@ -1,16 +1,11 @@ \chapter{Examples} -This section contains two examples. The first shows how to use \ZSI{} -to expose conventional CGI scripts through SOAP. -The input parameters and return value are Python lists and the SOAP -messages must contain all type information. -This is appropriate for building simple schema-less applications. -The second example shows how to to create a -more comprehensive application that uses \ZSI{} to validate its input -and output against a schema. - -\section{Simple example} +This section contains examples to help you better understand what \ZSI{} +offers. It is broken down into client-side and server-side examples, and +explores different implementation options a developer has using \ZSI{}. +\section{Server Side Examples} +\subsection{Simple example} Using the \module{ZSI.cgi} module, it is simple to expose Python functions as web services. Each function is invoked with all the input parameters specified in the @@ -45,19 +40,7 @@ For example, a fault will be sent if the \code{hello} function is given any arguments, or if the \code{average} function is given a non-integer. -If the above script is installed on the webserver running on the local -host, and if the URL is \code{/cgi-bin/simple-test}, then the following -code shows simple binding and access to the server: - -\begin{verbatim} -from ZSI.client import Binding -b = Binding(url='/cgi-bin/simple-test') -a = apply(b.average, range(1,11)) -assert a == 5 -print b.hello() -\end{verbatim} - -\section{More complex example} +\subsection{More complex example} We will now show a more complete example of a robust web service. It takes as input a player name and array of integers, and returns @@ -148,7 +131,7 @@ \end{verbatim} -\section{A \code{mod_python} example} +\subsection{A mod_python example} The Apache module \code{mod_python} (see \url{http://www.modpython.org}) embeds Python within the Apache server. @@ -199,3 +182,62 @@ req.write(out_str) return apache.OK \end{verbatim} + + +\section{Client Side Examples} +\subsection{Simple Example} +If the simple server side example shown above is installed on the webserver +running on the local host, and if the URL is \code{/cgi-bin/simple-test}, then +the following code shows simple binding and access to the server: + +\begin{verbatim} +from ZSI.client import Binding +b = Binding(url='/cgi-bin/simple-test') +a = apply(b.average, range(1,11)) +assert a == 5 +print b.hello() +\end{verbatim} + +\subsection{Complex Example} +If the operation invoked returns a ComplexType, typecode information must +be provided in order to tell \ZSI{} how to deserialize the response. Let's +assume the following server side implementation: + +\begin{verbatim} +# Complex type definition +class Person: + def __init__(self, name=None, age=0): + self.name = name + self.age = age + +Person.typecode = TC.Struct(Person, + [TC.String('name'), + TC.InonNegativeInteger('age')], + 'myApp:Person') + +# my web service +def getPerson(): + return Person('Christopher', 26) +\end{verbatim} + +In order for \ZSI{} to properly deserialize the returned complex type into +a Person instance, you must do one of two things: define the Person class (and +typecode) in a module named \module{ComplexTypes}, or pass the expected return +type to the \code{Binding.Receive} method. The former is recommended, as it +makes your code easier to read. Below you'll find client side code that +interacts with the operation described above (this assumes that you have +defined the Person class and typecode in a module named \module{ComplexTypes} +which is present in \code{sys.path}: + +\begin{verbatim} +from ZSI.client import Binding +b = Binding(url='/cgi-bin/complex-test') +a = apply(b.getPerson, '') +person = b.Receive() # you could also write: person = b.Receive(Person) +\end{verbatim} + +The person returned is an instance of Person. The deserialization in this +case was possible because \ZSI{} was able to locate the typecode information +for the returned Person and properly re-assemble the instance. If you would +like to explicitly tell \ZSI{} which class to use for deserialization, you +may do so by providing the class as an argument to the \code{Receive} method. |
From: <bl...@us...> - 2003-03-19 19:14:51
|
Update of /cvsroot/pywebsvcs/zsi/doc In directory sc8-pr-cvs1:/tmp/cvs-serv23511 Modified Files: zsi.tex Log Message: added chapter 11 (wsdl) Index: zsi.tex =================================================================== RCS file: /cvsroot/pywebsvcs/zsi/doc/zsi.tex,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- zsi.tex 13 Mar 2003 03:11:04 -0000 1.7 +++ zsi.tex 19 Mar 2003 19:14:47 -0000 1.8 @@ -90,6 +90,7 @@ \input{c08-fault} \input{c09-resolve} \input{c10-dispatch} +\input{c11-wsdl} \chapter{ZSI Schema} |
From: <bl...@us...> - 2003-03-19 19:14:23
|
Update of /cvsroot/pywebsvcs/zsi/doc In directory sc8-pr-cvs1:/tmp/cvs-serv23241 Added Files: c11-wsdl.tex Log Message: added --- NEW FILE: c11-wsdl.tex --- \chapter{WSDL Services} \section{Using Web Services} The \module{ZSI.wsdl} package provides a high-level client-side tool for working with remote web services. The \class{ServiceProxy} class acts as a proxy for a service that has a WSDL description, and exposes methods that reflect the methods of the remote service. \class{ServiceProxy} objects are very straightforward - you initialize a proxy from a WSDL URL, then call methods on the proxy corresponding to the methods of the remote service. \begin{verbatim} from ZSI.wsdl import ServiceProxy service = ServiceProxy('http://www.xmethods.net/sd/BabelFishService.wsdl') value = service.BabelFish('en_de', 'This is a test!') \end{verbatim} The methods of \class{ServiceProxy} instances can be called with positional arguments (where the argument positions match the message descriptions in the associated WSDL) or keyword arguments (where the arguments match the message descriptions by name). Arguments to \class{ServiceProxy} methods must be compatible with the types required by the WSDL description. The return value from a proxy method depends on the SOAP signature. If the remote service returns a single value, that value will be returned. If the remote service returns multiple ``out'' parameters, the return value of the proxy method will be a dictionary containing the out parameters indexed by name. Complex return types are also supported, meaning an aggregation of primitives can be returned from a service invocation. \section{\module{ZSI.wsdl.ServiceProxy}} \declaremodule{}{ZSI.wsdl.ServiceProxy} The \module{ServiceProxy} module provides a convenient way to call remote web services that are described with WSDL. Service proxies expose methods that reflect the methods of the remote web service. \begin{classdesc}{ServiceProxy}{wsdl,\optional{, service\optional{, port}}} The \class{ServiceProxy} class provides a high-level Pythonic way to call remote web services. A WSDL description must be available for the remote service. The \var{wsdl} argument may be either the URL of the service description or an existing \class{WSDL} instance. The optional \var{service} and \var{port} name the service and port within the WSDL description that should be used. If not specified, the first defined service and port will be used. \end{classdesc} \subsection{ServiceProxy Objects} A \class{ServiceProxy} instance, once instantiated, exposes callable methods that reflect the methods of the remote web service it represents. These methods may be called like normal methods, using *either* positional or keyword arguments (but not both). When a method of a \class{ServiceProxy} is called with positional arguments, the arguments are mapped to the SOAP request based on the parameter order defined in the WSDL description. If keyword arguments are passed, the arguments will be mapped based on their names. \subsection{ServiceProxy Example} This example demonstrates instantiating a \class{ServiceProxy} object from a WSDL description to call a remote web service method. It should be noted that \class{ServiceProxy} supports the passing and receiving of complex types. \begin{verbatim} from WebService.ServiceProxy import ServiceProxy service = ServiceProxy('http://www.xmethods.net/sd/BabelFishService.wsdl') value = service.BabelFish('en_de', 'This is a test!') \end{verbatim} \end{document} |
From: Christopher B. <bl...@gs...> - 2003-03-19 16:33:16
|
On Tue, Mar 18, 2003 at 09:49:19PM -0500, Rich Salz wrote: > I'm planning on integrating Brian's docs into zsi/doc as new chapters ... Ok. I didn't mean to "cvs add" the wsdl directory. I created a c11-wsdl.tex file and pruned down a lot of Brian's stuff to (hopefully) fit our needs. Should I commit it? Wonder why my load is so high... -c -- 9:55pm up 148 days, 13:46, 3 users, load average: 14.69, 14.79, 14.62 |
From: <bl...@us...> - 2003-03-19 06:42:49
|
Update of /cvsroot/pywebsvcs/zsi/ZSI In directory sc8-pr-cvs1:/tmp/cvs-serv27195 Modified Files: TCcompound.py Log Message: added hook to look for lowercase versions of the instance inside the __dict__ when serializing a complex type Index: TCcompound.py =================================================================== RCS file: /cvsroot/pywebsvcs/zsi/ZSI/TCcompound.py,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- TCcompound.py 14 Mar 2003 05:22:22 -0000 1.13 +++ TCcompound.py 19 Mar 2003 06:42:43 -0000 1.14 @@ -166,6 +166,8 @@ raise TypeError("Classless struct didn't get dictionary") for what in self.ofwhat: v = d.get(what.aname) + if v is None: + v = d.get(what.aname.lower()) if what.optional and v is None: continue try: if what.repeatable and type(v) in _seqtypes: |
From: <bl...@us...> - 2003-03-19 06:40:50
|
Update of /cvsroot/pywebsvcs/zsi/ZSI In directory sc8-pr-cvs1:/tmp/cvs-serv26488 Modified Files: TCtimes.py Log Message: added call to pyobj.tuple prior to serialization. my guess is that the DateTime instance was at one point scriptable, but it no longer is. thus, in order to script it, you must split it into a tuple first Index: TCtimes.py =================================================================== RCS file: /cvsroot/pywebsvcs/zsi/ZSI/TCtimes.py,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- TCtimes.py 9 May 2002 16:21:54 -0000 1.6 +++ TCtimes.py 19 Mar 2003 06:40:45 -0000 1.7 @@ -106,11 +106,13 @@ pyobj = time.gmtime(pyobj) n = name or self.oname or ('E%x' % id(pyobj)) d = {} + pyobj = pyobj.tuple() if 1 in map(lambda x: x < 0, pyobj[0:6]): pyobj = map(abs, pyobj) d['neg'] = '-' else: d['neg'] = '' + d = { 'Y': pyobj[0], 'M': pyobj[1], 'D': pyobj[2], 'h': pyobj[3], 'm': pyobj[4], 's': pyobj[5], } val = self.format % d |
From: Rich S. <rs...@da...> - 2003-03-19 02:50:15
|
> Log Message: > Directory /cvsroot/pywebsvcs/zsi/doc/wsdl added to the repository I'm planning on integrating Brian's docs into zsi/doc as new chapters ... |
From: <bl...@us...> - 2003-03-19 02:44:23
|
Update of /cvsroot/pywebsvcs/zsi/doc/wsdl In directory sc8-pr-cvs1:/tmp/cvs-serv24873/wsdl Log Message: Directory /cvsroot/pywebsvcs/zsi/doc/wsdl added to the repository |
From: <bl...@us...> - 2003-03-19 01:42:34
|
Update of /cvsroot/pywebsvcs/zsi In directory sc8-pr-cvs1:/tmp/cvs-serv6223 Modified Files: setup.py Log Message: added ZSI.wsdl package Index: setup.py =================================================================== RCS file: /cvsroot/pywebsvcs/zsi/setup.py,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- setup.py 18 Mar 2003 17:44:27 -0000 1.2 +++ setup.py 19 Mar 2003 01:42:31 -0000 1.3 @@ -21,7 +21,7 @@ name="ZSI", version=_version, licence="Python", - packages=[ "ZSI", ], + packages=[ "ZSI", "ZSI.wsdl" ], description="Zolera SOAP Infrastructure", author="Rich Salz", author_email="rs...@zo...", |
From: <rs...@us...> - 2003-03-19 01:34:27
|
Update of /cvsroot/pywebsvcs/zsi In directory sc8-pr-cvs1:/tmp/cvs-serv3503 Modified Files: README Log Message: Test checkin messages Index: README =================================================================== RCS file: /cvsroot/pywebsvcs/zsi/README,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 |
From: <rs...@us...> - 2003-03-19 01:27:00
|
Update of /cvsroot/pywebsvcs/zsi In directory sc8-pr-cvs1:/tmp/cvs-serv1100 Modified Files: README Log Message: Test checkin messages Index: README =================================================================== RCS file: /cvsroot/pywebsvcs/zsi/README,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 |
From: <rs...@us...> - 2003-03-18 17:47:59
|
Update of /cvsroot/pywebsvcs/CVSROOT In directory sc8-pr-cvs1:/tmp/cvs-serv25478 Modified Files: loginfo Log Message: test of pywebsvcs-checkins mailing list Index: loginfo =================================================================== RCS file: /cvsroot/pywebsvcs/CVSROOT/loginfo,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 |