logo       

smartcard access from jython: msg#00009

lang.jython.devel

Subject: smartcard access from jython

Hi All,

This is quite specific but I hope someone can help me..
I'm using a Sclumberger smartcard with their java libraries
to communicate with the card. Everything works fine(listing
connected cards, connecting etc.) through Jython. One thing
gives me a runtime error, one is suppose to implement the
slb.iop.IOPListener interface to catch events like
card/reader removed/inserted. Here is the implementation.

#######
class SymSIOP(slb.iop.IOPListener):
def CardRemoved(event):
# iopCard = slb.iop.SmartCard()
# print "card removed"
pass
def CardInserted(event):
#print "card inserted"
pass
def ReaderRemoved(event):
#print "reader removed"
pass
def ReaderInserted(event):
#print "reader inserted"
pass

Now, Initializing it like from another class:
self.sIOP = slb.iop.IOP()
lSymSIOP = SymSIOP();
self.sIOP.addIOPListener(lSymSIOP);

In Java the class will look something like this(from their
example):

########
class SymSIOP implements slb.iop.IOPListener {
public void CardRemoved(slb.iop.IOPEvent event) {
//disconnect from card
}

public void CardInserted(slb.iop.IOPEvent event)
{
//Add card insert code here
}

public void ReaderRemoved(slb.iop.IOPEvent event)
{
//Add reader removed code here
}

public void ReaderInserted(slb.iop.IOPEvent event)
{
//Add reader insert code here
}
}


Now running it through jython, it runs fine but when I
remove the card and insert it again(always on the 2nd
action), I get a error from windows(popup): 'java.exe has
generated errors and will be closed by Windows. You will
need to restart the program. An error log is being created'
I would think it is the implementation of the interface,
maybe the event datatype that is not right. Also where does
windows log these errors..

Thanks for the help!!!

Regards,
Eugene.
___________________________________________
Look Good, Feel Good www.healthiest.co.za



-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise