Ignore:
Timestamp:
16/06/06 14:17:07 (14 years ago)
Author:
astephen
Message:

Updated lots of stuff to get zsi working with version 2.0 or lower.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI04-geosplat/trunk/pygsc/WSCaller.py

    r798 r1210  
    1313 
    1414# Import standard library modules 
    15 import os, sys 
     15import os, sys, re 
    1616 
    1717# Import SOAP library 
     
    3535        # Set up SOAP bindings 
    3636        trace=open('/tmp/tracefile.txt','w') 
    37         self.server=Binding(url='', host=SOAP_SERVER_NAME, port=SOAP_SERVER_PORT, tracefile=trace)               
     37        urlPattern=re.compile(r"(\w+)://([\w.]+):(\d+)/(.*)$") 
     38        (transport, soap_server_host, soap_server_port, cmd)=urlPattern.match(SOAP_SERVER_URL).groups() 
     39        from ZSI.version import Version as zsiv 
     40        zsiv=float("%s.%s" % zsiv[:2]) 
     41        if zsiv<2.0: 
     42            self.server=Binding(url="", host=soap_server_host, port=soap_server_port) 
     43        else: 
     44            self.server = Binding(url=SOAP_SERVER_URL)   
     45#       self.server=Binding(url='', host=SOAP_SERVER_NAME, port=SOAP_SERVER_PORT, tracefile=trace)               
    3846 
    3947 
     
    4957        try: 
    5058            response=apply(getattr(self.server, methodName), args)  
     59            response=deUnicodeObject(response)       
    5160        except Exception, error: 
    5261            if str(error)=="(111, 'Connection refused')": 
Note: See TracChangeset for help on using the changeset viewer.