;ò ײŠGc@sÖdZdklZdZdklZdkZdkTdkZdk Z dk Tdk l Z dk l Z dklZdkTd klZlZd „Zd fd „ƒYZd fd„ƒYZdfd„ƒYZdS(sõ ################################################################################ # # SOAPpy - Cayce Ullman (cayce@actzero.com) # Brian Matthews (blm@actzero.com) # Gregory Warnes (gregory_r_warnes@groton.pfizer.com) # Christopher Blunck (blunck@gst.com) # ################################################################################ # Copyright (c) 2003, Pfizer # Copyright (c) 2001, Cayce Ullman. # Copyright (c) 2001, Brian Matthews. # # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # Redistributions of source code must retain the above copyright notice, this # list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright notice, # this list of conditions and the following disclaimer in the documentation # and/or other materials provided with the distribution. # # Neither the name of actzero, inc. nor the names of its contributors may # be used to endorse or promote products derived from this software without # specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # ################################################################################ (s nested_scopess8$Id: Client.py,v 1.20 2004/04/10 04:22:52 irjudson Exp $(s __version__N(s*(sConfig(s parseSOAPRPC(s buildSOAP(s faultTypessimplifycCsdtdSdS(NsSOAPpy s (pywebsvcs.sf.net)(s __version__(((sD/mnt/gmirror/ports/net/py-soappy/work/SOAPpy-0.11.6/SOAPpy/Client.pys SOAPUserAgentCss SOAPAddresscBs#tZed„Zd„ZeZRS(NcCsIti|ƒ\}}|dd!djo3|tjo|d|}nd|}d}nti|ƒ\}}yt |ƒd|}WnnX| o d}n|ddd fjo t d ‚n|d jo|i o t d ‚n|djo|i o t d ‚nti|ƒ\|_}||_||_||_dS( Niis//s:shttps localhost:s/shttpsshttpgsunsupported SOAP protocols4GSI client not supported by this Python installations4SSL client not supported by this Python installation(surllibs splittypesurlsprotosurisNones splithostshostspathsintsIOErrorsconfigs GSIclientsAttributeErrors SSLclients splitusersselfsuser(sselfsurlsconfigsprotosurishostspath((sD/mnt/gmirror/ports/net/py-soappy/work/SOAPpy-0.11.6/SOAPpy/Client.pys__init__Hs0          cCsd|iSdS(Ns%(proto)s://%(host)s%(path)s(sselfs__dict__(sself((sD/mnt/gmirror/ports/net/py-soappy/work/SOAPpy-0.11.6/SOAPpy/Client.pys__str__ls(s__name__s __module__sConfigs__init__s__str__s__repr__(((sD/mnt/gmirror/ports/net/py-soappy/work/SOAPpy-0.11.6/SOAPpy/Client.pys SOAPAddressGs $ s HTTPTransportcBs&tZd„Zeeeed„ZRS(NcCs[t|ƒtjo@d|d}ti||ƒ}|o|idƒSqW|Sn|SdS(sQExtract the (possibly extended) namespace from the returned SOAP message.sxmlns:\w+=['"](s [^'"]*)['"]iN( stypesoriginal_namespaces StringTypespatternsressearchsdatasmatchsgroup(sselfsoriginal_namespacesdataspatternsmatch((sD/mnt/gmirror/ports/net/py-soappy/work/SOAPpy-0.11.6/SOAPpy/Client.pysgetNSsscCsàdk}t|tƒ ot||ƒ}n|o%|}|id|i|i }n|i}|i }|idjo&dk l }||d|i ƒ}n3|idjo|i|ƒ}n|i|ƒ}|id|ƒ|id|iƒ|idtƒƒd }|tjo|d |7}n|id |ƒ|id tt|ƒƒƒ|itjo6ti|iƒ} |id d| iddƒƒn|tjpt|ƒdjo|iddƒn|idd|ƒ|i ojd}t"|ƒd||i#fGHdG|iGHdt$dGHdG|GHdGt|ƒGHd|GHt%|ƒn|i&ƒ|i'o8d}t"|ƒ|G|ddjoHnt%|ƒn|i(|ƒ|i)ƒ\} } }|i-dd ƒ}|i-d ƒ}|tjo"|i0ƒi1ƒ}t|ƒ}n"t3|ƒ}|i0ƒi1|ƒ}|i4o1dG| GHd G| GHd!G|GHd"G|GHd#G|GHn|i5ogd$}t"|ƒ|i,o0d%| | fGHdi6t7d&„|i,ƒƒGHnd'| | fGHt%|ƒnd(„} | d)jo| |d ƒo |dj ot9| | ƒ‚n|i:oKd*}t"|ƒ|Gt|ƒdjo|ddjoHnt%|ƒn| d+d)fjot9| | ƒ‚n|tjo t} n|i>||ƒ} || fSdS(,Ns://shttpg(sGSIHTTPstcpAttrshttpssPOSTsHosts User-agentstext/xmls; charset="%s"s Content-typesContent-lengths AuthorizationsBasic s sis SOAPActions"%s"sOutgoing HTTP headerss POST %s %ssHost:sUser-agent: SOAPpy s (http://pywebsvcs.sf.net)s Content-type:sContent-length:sSOAPAction: "%s"s Outgoing SOAPiÿÿÿÿs content-typescode=smsg=sheaders=s content-type=sdata=sIncoming HTTP headerssHTTP/1.? %d %scCs |iƒS(N(sxsstrip(sx((sD/mnt/gmirror/ports/net/py-soappy/work/SOAPpy-0.11.6/SOAPpy/Client.pysâssHTTP/0.9 %d %scCs|dt|ƒ!|jSdS(Ni(sstringslensval(sstringsval((sD/mnt/gmirror/ports/net/py-soappy/work/SOAPpy-0.11.6/SOAPpy/Client.pys startswithçsiôs Incoming SOAPiÈ(?shttplibs isinstancesaddrs SOAPAddresssconfigs http_proxys real_addrsprotoshostspaths real_paths pyGlobus.iosGSIHTTPstcpAttrsrsHTTPSsHTTPs putrequests putheaders SOAPUserAgentstsencodingsNonesstrslensdatasusersbase64s encodestringsvalsreplaces soapactionsdumpHeadersOutsss debugHeaders _http_vsn_strs __version__s debugFooters endheaderss dumpSOAPOutssendsgetreplyscodesmsgsheaderssgets content_typescontent_lengthsgetfilesreads message_lensintsdebugs dumpHeadersInsjoinsmaps startswiths HTTPErrors dumpSOAPIns namespacesnew_nssselfsgetNS(sselfsaddrsdatas namespaces soapactionsencodings http_proxysconfigscontent_lengthscodes startswithsnew_nssvalsmsgsGSIHTTPs message_lens content_types real_addrshttplibs real_pathsheaderssssrst((sD/mnt/gmirror/ports/net/py-soappy/work/SOAPpy-0.11.6/SOAPpy/Client.pyscall‚sª     $                      ! +  $  (s__name__s __module__sgetNSsNonesConfigscall(((sD/mnt/gmirror/ports/net/py-soappy/work/SOAPpy-0.11.6/SOAPpy/Client.pys HTTPTransportrs s SOAPProxyc BsxtZeeeeeddeeeded„ Zd„Zeeeed„Zd„Zd„Z d fd „ƒYZ RS( NsUTF-8iicCs|tjodi|ƒn| tjo| i|_n | |_| tjo| i|_n | |_t|| ƒ|_||_ ||_ ||_ ||_ |ƒ|_ ||_||_| |_| |_| |_t| dƒo t| dƒo| i|_| i|_ndS(Nss channel_modesdelegation_mode(sencodingsNonesencodesunwrap_resultssconfigsselfssimplify_objectss SOAPAddresssproxys namespaces soapactionsheaders methodattrss transports throw_faultss http_proxysnorootshasattrs channel_modesdelegation_mode(sselfsproxys namespaces soapactionsheaders methodattrss transportsencodings throw_faultssunwrap_resultss http_proxysconfigsnorootssimplify_objects((sD/mnt/gmirror/ports/net/py-soappy/work/SOAPpy-0.11.6/SOAPpy/Client.pys__init__s,                 cCs|i||hƒSdS(N(sselfs_SOAPProxy__callsmethodsargs(sselfsmethodsargs((sD/mnt/gmirror/ports/net/py-soappy/work/SOAPpy-0.11.6/SOAPpy/Client.pysinvoke0scCs`|p|i}|p|i}|o%t|ƒtjo|d}qin|io |i}n|}|o%t|ƒtjo|d}qžn |i }|p|i }|o%t|ƒtjo|d}qãn |i}|p|i}t d|d|d|d|d|d|d|id |id |iƒ } d} yF|ii|i| ||d|id |id |iƒ\}|_Wnptj od}t|id ƒoEt|iiƒo+|ii|i|ƒ} | o‚qîqõ‚qú‚nX| oF|ii|i| ||d|id |id |iƒ\}|_nt|d dƒ\}}y|i!o t"|t#ƒ} Wn d} nX| o|GH|‚n|i%owyid} xE|i'i(ƒD]4} | ddjo| d7} t*|| ƒ}qÅqÅW| djo |}nWq#q#Xn|i,ot-|ƒ}n|ii.o||fSn|SdS(Nisargsskwsmethods namespacesheaders methodattrssencodingsconfigsnoroots http_proxys faultHandlersattrsis_(/snssselfs namespacesmas methodattrsssastypes TupleTypes soapactionsnameshdsheaders buildSOAPsargsskwsencodingsconfigsnorootsms call_retrys transportscallsproxys http_proxysrs Exceptionsexshasattrscallables faultHandlers parseSOAPRPCspsattrss throw_faultss isinstances faultTypes throw_structsunwrap_resultsscounts__dict__skeyssisgetattrstssimplify_objectsssimplifysreturnAllAttrs(sselfsnamesargsskwsnsssashdsmasexs throw_structs call_retryscountsismspsrstsattrs((sD/mnt/gmirror/ports/net/py-soappy/work/SOAPpy-0.11.6/SOAPpy/Client.pys__call3s‚                 cCs|it|hƒSdS(N(sselfs_SOAPProxy__callsNonesbody(sselfsbody((sD/mnt/gmirror/ports/net/py-soappy/work/SOAPpy-0.11.6/SOAPpy/Client.pys _callWithBody¢scCs:|djo t|‚n|i|i|d|iƒSdS(Ns__del__sconfig(snamesAttributeErrorsselfs_SOAPProxy__Methods_SOAPProxy__callsconfig(sselfsname((sD/mnt/gmirror/ports/net/py-soappy/work/SOAPpy-0.11.6/SOAPpy/Client.pys __getattr__¥s  s__MethodcBsMtZeeeeed„Zd„Zd„Zd„Zd„Zd„Z RS(NcCsG||_||_||_||_||_ ||_ ||_dSdS(N(scallsselfs _Method__callsnames _Method__namesnss _Method__nsssas _Method__sashds _Method__hdsmas _Method__masconfigs_Method__config(sselfscallsnamesnsssashdsmasconfig((sD/mnt/gmirror/ports/net/py-soappy/work/SOAPpy-0.11.6/SOAPpy/Client.pys__init__²s       cOs`|iddjo8|iddgjo|iƒSq\|i||ŽSn|i||ŽSdS(Nis_s__repr__s__str__(sselfs _Method__names__repr__s_Method__f_callsargsskws_Method__r_call(sselfsargsskw((sD/mnt/gmirror/ports/net/py-soappy/work/SOAPpy-0.11.6/SOAPpy/Client.pys__call__¾s cCs™|djo t|‚n|iddjo/|i|i||i|i|i|i ƒSn|i|id|i|f|i|i|i|i ƒSdS(Ns__del__is_s%s.%s( snamesAttributeErrorsselfs _Method__names __class__s _Method__calls _Method__nss _Method__sas _Method__hds _Method__ma(sselfsname((sD/mnt/gmirror/ports/net/py-soappy/work/SOAPpy-0.11.6/SOAPpy/Client.pys __getattr__Çs  cOs||idjo ||_nX|idjo ||_n;|idjo ||_n|idjo ||_n|SdS(Ns_nss_sas_hds_ma(sselfs _Method__namesargss _Method__nss _Method__sas _Method__hds _Method__ma(sselfsargsskw((sD/mnt/gmirror/ports/net/py-soappy/work/SOAPpy-0.11.6/SOAPpy/Client.pys__f_callÒs    cOs2|i|i|||i|i|i|iƒSdS(N( sselfs _Method__calls _Method__namesargsskws _Method__nss _Method__sas _Method__hds _Method__ma(sselfsargsskw((sD/mnt/gmirror/ports/net/py-soappy/work/SOAPpy-0.11.6/SOAPpy/Client.pys__r_callÙscCsd|it|ƒfSdS(Ns <%s at %d>(sselfs __class__sid(sself((sD/mnt/gmirror/ports/net/py-soappy/work/SOAPpy-0.11.6/SOAPpy/Client.pys__repr__Ýs( s__name__s __module__sNonesConfigs__init__s__call__s __getattr__s_Method__f_calls_Method__r_calls__repr__(((sD/mnt/gmirror/ports/net/py-soappy/work/SOAPpy-0.11.6/SOAPpy/Client.pys__Method«s   ( s__name__s __module__sNones HTTPTransportsConfigs__init__sinvokes_SOAPProxy__calls _callWithBodys __getattr__s_SOAPProxy__Method(((sD/mnt/gmirror/ports/net/py-soappy/work/SOAPpy-0.11.6/SOAPpy/Client.pys SOAPProxys -) o  (s__doc__s __future__s nested_scopessidentsversions __version__surllibstypessresbase64sErrorssConfigsParsers parseSOAPRPCs SOAPBuilders buildSOAPs UtilitiessTypess faultTypessimplifys SOAPUserAgents SOAPAddresss HTTPTransports SOAPProxy(s buildSOAPsidents nested_scopesssimplifys SOAPAddresssbase64s parseSOAPRPCsurllibs faultTypesres SOAPProxys HTTPTransports __version__sConfigs SOAPUserAgent((sD/mnt/gmirror/ports/net/py-soappy/work/SOAPpy-0.11.6/SOAPpy/Client.pys?)s"         +”