I honestly don't know if this is your problem, but I do know that this IS a
problem:

You've set up the CardService "opencard.opt.database.BasicDatabaseFactory"
in your properties file, but then, you're trying to get service
"opencard.opt.iso.fs.FileAccessCardService" in your code.  The second one
needs to be in your Properties file.

Tom

"Gary Boon" <[EMAIL PROTECTED]> wrote in message
87uhc4$d9h$[EMAIL PROTECTED]">news:87uhc4$d9h$[EMAIL PROTECTED]...
> Hi,
>
> I want to use OCF and PCSC to access the card reader I presently have. I'm
> using a Towitoko chipdrive extern. When I insert the card the reader
> indicated an error (LED displaying Red, Green then Red). I have the
Towitoko
> drivers installed for PCSC.
>
> I've assumed I can use the reference implementation for PCSC, as detailed
> below, and access the card as displayed below.
>
> Is there something I'm missing?
>
> I created the following .properties file:
>
> OpenCard.services =
> com.ibm.opencard.terminal.pcsc10.Pcsc10CardTerminalFactory
> OpenCard.services = opencard.opt.database.BasicDatabaseFactory
>
> OpenCard.trace = opencard:5
>
> and the following source file:
>
> import opencard.core.service.SmartCard;
> import opencard.core.service.CardRequest;
> import opencard.opt.iso.fs.FileAccessCardService;
> import opencard.opt.iso.fs.CardFile;
>
> public class ReadFile
> {
>  public static void main (String[] args)
>  {
>      try
>   {
>       SmartCard.start();
>
>    CardRequest cr = new CardRequest(FileAccessCardService.class);
>
>    SmartCard sc = SmartCard.waitForCard(cr);
>
>    if (sc == null)
>    {
>        // Handle error
>    }
>    else
>    {
>        sc.close();
>    }
>   }
>   catch (Exception e)
>   {
>    e.printStackTrace();
>   }
>   finally
>   {
>          try
>    {
>     SmartCard.shutdown();
>    }
>    catch (Exception e)
>    {
>     e.printStackTrace();
>    }
>   }
>  }
> }
>
> Thanks
>
> Gary
>
>
>




---
> Visit the OpenCard web site at http://www.opencard.org/ for more
> information on OpenCard---binaries, source code, documents.
> This list is being archived at http://www.opencard.org/archive/opencard/

! To unsubscribe from the [EMAIL PROTECTED] mailing list send an email
! to
!                           [EMAIL PROTECTED]
! containing the word
!                           unsubscribe 
! in the body.

Reply via email to