[AG-TECH] VenueIW

mimiller at ncsa.uiuc.edu mimiller at ncsa.uiuc.edu
Fri May 20 12:40:27 CDT 2005


So to get the client profile I need to create an instance of VenueClientIW 
but the API calls for a URL to be passed to VenueClientIW.  In the example 
here:
http://www-unix.mcs.anl.gov/fl/research/accessgrid/documentation/developer/examples/GetVCServices.py

The url is obtained by:


# Find valid venue client
urlList = GetVenueClientUrls()
for url in urlList:
     if VenueClientIW(url).IsValid():
         break

# Create interface wrapper
venueClient = VenueClientIW(url)

So here's my code:

         self.VCurlList = GetVenueClientUrls()

         for url in self.VCurlList:
             if VenueClientIW(url).IsValid():
                 self.MYK_venueclient = VenueClientIW(url)
             else:
                  #start a VenueClientIW from scratch.  How do I do this?
                 self.MYK_venueclient = 
VenueClientIW("https://localhost:11000")
                 break


But if I don't have a VenueClient running, the VenueClientIW(url) fails with:
   File "c:\python23\lib\httplib.py", line 564, in send
     self.connect()
   File "C:\Python23\Lib\site-packages\pyGlobus\io.py", line 1093, in connect
     self.sock.connect(self.host, self.port, self.io_attr)
   File "C:\Python23\Lib\site-packages\pyGlobus\io.py", line 671, in connect
     raise ex
pyGlobus.io.GSITCPSocketException: a system call failed (Invalid argument)


If I do have a VenueClient running then it fails with:
   File "C:\Python23\Lib\site-packages\pyGlobus\io.py", line 1093, in connect
     self.sock.connect(self.host, self.port, self.io_attr)
   File "C:\Python23\Lib\site-packages\pyGlobus\io.py", line 671, in connect
     raise ex
pyGlobus.io.GSITCPSocketException: no credentials:
Problem with local credentialsunable to access trusted certificates in: 
x509_cer
t_dir=C:\Documents and Settings\All Users\Application 
Data\AccessGrid\certificat
es
   Function:proxy_init_cred

And even so, I don't think I want to have to have a VenueClient running on 
my machine in order for my app to work.  How do I create an instance of 
VenueClientIW from scratch?  Or do I misunderstand how VenueClientIW is to 
be used...?

MYK



At 10:54 AM 5/20/2005, Susanne Lefvert wrote:

>It is not the VenueIW call that fails it is the self.currentVenue.Enter()
>call. If you look in the API the enter call should include a client profile:
>
>Enter(self, profile)
>
>Susanne
>
>
>
>On Fri, 20 May 2005 mimiller at ncsa.uiuc.edu wrote:
>
> > I was using the example listed here:
> > 
> http://www-unix.mcs.anl.gov/fl/research/accessgrid/documentation/developer/examples/GetClients.py
> >
> > To try to create a Venue object thus:
> >      def ChangeCurrentVenue(self, venuedesc = None):
> >          if venuedesc == None:
> >              if self.isInVenue:
> >                  self.currentvenue.Exit()
> >          else:
> >              self.currentvenue = VenueIW(venuedesc.GetURI())
> >              self.currentvenue.Enter()
> >              self.isInVenue=1
> >
> > and I get the following error
> >
> > VenueManagement.py", line 920, in ChangeCurrentVenue
> >      self.currentvenue.Enter()
> > TypeError: Enter() takes exactly 2 arguments (1 given)
> >
> > So I looked at the VenueIW API which states:
> > __init__(self, url, faultHandler)
> >
> > In the example at the link above all I had to do was this:
> >
> > venue = VenueIW(url)
> >
> > I've got a basic idea of what the faultHandler should do, but I'm not sure
> > what it should be, an object? a string? a callback function?
> >
> > I can't seem to find any other examples of using the VenueIW
> > interface.  Why does it work with the example and not with my code?
> >
> > Thanx,
> >
> > Michael Miller
> > System Engineer
> > Video Technology Services
> > Persistent Infrastructure Directorate
> > National Center for Supercomputing Applications
> > University of Illinois - UC
> > 217-649-0747
> >
> > "If you're clear in your vision and trust the people in your team with
> > clear objectives, they will invariably do their best to achieve everything
> > desired, and usually deliver everything you could have hoped for and even
> > more." -Paul Debevec
> >
> >




More information about the ag-tech mailing list