Changeset c179764 for fedd/federation


Ignore:
Timestamp:
Dec 7, 2010 9:20:18 AM (14 years ago)
Author:
Ted Faber <faber@…>
Branches:
axis_example, compt_changes, info-ops, master
Children:
2453416
Parents:
a7c0bcb
git-author:
Ted Faber <faber@…> (12/06/10 21:27:45)
git-committer:
Ted Faber <faber@…> (12/07/10 09:20:18)
Message:

Deal with ZSI 2.1

Location:
fedd/federation
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • fedd/federation/parse_detail.py

    ra7c0bcb rc179764  
    11#!/usr/local/bin/python
    22
    3 from fedd_services import *
     3from fedd_client import *
    44
    55from ZSI.TC import QName, String, URI, AnyElement, UNBOUNDED, Any
  • fedd/federation/remote_service.py

    ra7c0bcb rc179764  
    1818from service_error import service_error
    1919from xmlrpclib import ServerProxy, dumps, loads, Fault, Error, Binary
    20 
    21 import fedd_services
    22 import fedd_internal_services
     20try:
     21    import fedd_services
     22    import fedd_internal_services
     23except ImportError:
     24    import fedd_server
     25    import fedd_client
     26
    2327from util import fedd_ssl_context
    2428from fedid import fedid
     
    279283        self.service_name = service_name
    280284
    281         if getattr(fedd_services.feddBindingSOAP, service_name, None):
    282             self.locator = fedd_services.feddServiceLocator
    283             self.port_name = 'getfeddPortType'
    284         elif getattr(fedd_internal_services.feddInternalBindingSOAP,
    285                 service_name, None):
    286             self.locator = fedd_internal_services.feddInternalServiceLocator
    287             self.port_name = 'getfeddInternalPortType'
     285        try:
     286            if getattr(fedd_services.feddBindingSOAP, service_name, None):
     287                self.locator = fedd_services.feddServiceLocator
     288                self.port_name = 'getfeddPortType'
     289            elif getattr(fedd_internal_services.feddInternalBindingSOAP,
     290                    service_name, None):
     291                self.locator = fedd_internal_services.feddInternalServiceLocator
     292                self.port_name = 'getfeddInternalPortType'
     293        except NameError:
     294            if getattr(fedd_client.feddBindingSOAP, service_name, None):
     295                self.locator = fedd_client.feddServiceLocator
     296                self.port_name = 'getfeddPort'
     297            elif getattr(fedd_internal_client.feddInternalBindingSOAP,
     298                    service_name, None):
     299                self.locator = fedd_internal_client.feddInternalServiceLocator
     300                self.port_name = 'getfedd_internalPort'
     301
    288302
    289303        if request_message: self.request_message = request_message
    290304        else:
    291305            request_message_name = "%sRequestMessage" % service_name
    292             self.request_message = \
    293                     getattr(fedd_services, request_message_name, None) or \
    294                     getattr(fedd_internal_services, request_message_name, None)
     306            try:
     307                self.request_message = \
     308                        getattr(fedd_services, request_message_name, None) or \
     309                        getattr(fedd_internal_services, request_message_name,
     310                                None)
     311            except NameError:
     312                self.request_message = \
     313                        getattr(fedd_client, request_message_name, None) or \
     314                        getattr(fedd_internal_client, request_message_name,
     315                                None)
    295316            if not self.request_message and strict:
    296317                raise service_error(service_error.internal,
Note: See TracChangeset for help on using the changeset viewer.