ó
˜µÈSc           @   sj  d  Z  d Z d d l m Z d d l Z d d l Z d d l Z d d l Z d d l Td d l	 Z	 d d l
 m Z d d l m Z d d l m Z m Z m Z d d	 l m Z d d
 l m Z d d l m Z m Z y d d l m Z Wn n Xd d l Td d l m Z m Z d d l m Z d „  Z  e  ƒ  Z d e e! f d „  ƒ  YZ" d e e! f d „  ƒ  YZ# d S(   s0  
GSIServer - Contributed by Ivan R. Judson <judson@mcs.anl.gov>


################################################################################
#
# SOAPpy - Cayce Ullman       (cayce@actzero.com)
#          Brian Matthews     (blm@actzero.com)
#          Gregory Warnes     (Gregory.R.Warnes@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.
#
################################################################################

s4   $Id: GSIServer.py 1468 2008-05-24 01:55:33Z warnes $iÿÿÿÿ(   t   __version__N(   t   *(   t   parseSOAPRPC(   t
   SOAPConfig(   t	   faultTypet   voidTypet   simplify(   t   NS(   t	   buildSOAP(   t   debugHeadert   debugFooter(   t   SSL(   t   GSITCPSocketServert   ThreadingGSITCPSocketServer(   t   iocc          C   s7   t  ƒ  }  t j |  _ t j |  _ d  |  _ d |  _ |  S(   Nt
   _authorize(	   R   R   t&   GLOBUS_IO_SECURE_CHANNEL_MODE_GSI_WRAPt   channel_modet+   GLOBUS_IO_SECURE_DELEGATION_MODE_FULL_PROXYt   delegation_modet   Nonet   tcpAttrt
   authMethod(   t   config(    (    s4   /usr/lib/python2.7/dist-packages/SOAPpy/GSIServer.pyt	   GSIConfigK   s    			t   GSISOAPServerc           B   s,   e  Z d e d d e d d „ Z d „  Z RS(   t	   localhosti@  i    s   UTF-8c         C   s   | d  k r d j | ƒ n  | |  _ i  |  _ i  |  _ | |  _ | |  _ | |  _ d |  _ t	 j
 |  | | |  j j |  j j d |  j j ƒd  S(   Nt    i   R   (   R   t   encodet	   namespacet   objmapt   funcmapt   encodingR   t   logt   allow_reuse_addressR   t   __init__R   R   R   (   t   selft   addrt   RequestHandlerR!   R    R   R   (    (    s4   /usr/lib/python2.7/dist-packages/SOAPpy/GSIServer.pyR#   V   s    								c         C   s   t  j |  ƒ \ } } | | f S(   N(   R   t   get_request(   R$   t   sockR%   (    (    s4   /usr/lib/python2.7/dist-packages/SOAPpy/GSIServer.pyR'   l   s    (   R   i@  N(   t   __name__t
   __module__t   SOAPRequestHandlert   ConfigR   R#   R'   (    (    (    s4   /usr/lib/python2.7/dist-packages/SOAPpy/GSIServer.pyR   U   s   t   ThreadingGSISOAPServerc           B   s,   e  Z d e d d e d d „ Z d „  Z RS(   R   i@  i    s   UTF-8c         C   s   | d  k r d j | ƒ n  | |  _ i  |  _ i  |  _ | |  _ | |  _ | |  _ d |  _ t	 j
 |  | | |  j j |  j j d |  j j ƒd  S(   NR   i   R   (   R   R   R   R   R   R    R   R!   R"   R   R#   R   R   R   (   R$   R%   R&   R!   R    R   R   (    (    s4   /usr/lib/python2.7/dist-packages/SOAPpy/GSIServer.pyR#   s   s    								c         C   s   t  j |  ƒ \ } } | | f S(   N(   R   R'   (   R$   R(   R%   (    (    s4   /usr/lib/python2.7/dist-packages/SOAPpy/GSIServer.pyR'   ‰   s    (   s	   localhosti@  N(   R)   R*   R+   R,   R   R#   R'   (    (    (    s4   /usr/lib/python2.7/dist-packages/SOAPpy/GSIServer.pyR-   q   s   ($   t   __doc__t   identt   versionR    t   ret   sockett   syst   SocketServert   typest   BaseHTTPServert   ParserR   R,   R   t   TypesR   R   R   R   t   SOAPBuilderR   t	   UtilitiesR	   R
   t   M2CryptoR   t   Servert   pyGlobus.ioR   R   t   pyGlobusR   R   t   SOAPServerBaseR   R-   (    (    (    s4   /usr/lib/python2.7/dist-packages/SOAPpy/GSIServer.pyt   <module>-   s2   
  
		