0 Replies Latest reply on Dec 6, 2012 5:45 AM by 975608

    Java Card 3.0 Connected Edition: Inter-application communication

      I've created two applets: ServerApplet and ClientApplet, for inter application communication using SIO.
      For ServerApplet:
      1) Create ServerInterface interface
      2) Create ServerSIO class that implements ServerInterface
      3) Create ServerFactory class that implements ServiceFactory
      4) Create ServerApplet that registered "MySio" using ServiceRegistry during class construction.

      For ClientApplet:
      1) Create ServerInterface interface
      2) Create ClientApplet.
      3) In process(), I place the following (<server>/<aid> represents my server aid, not the server instance aid):
      if (ins == ((byte)0x10)) {
        ServerInterface obj = (ServerInterface) ServiceRegistry.getServiceRegistry.lookup("sio:///aid/<server>/<aid>/MySio", (byte)0);
        if (obj == null) ISOException.throwIt((short)0x7F00); 
      To simulate, this is what I did:
      1) Load ServerApplet and create an instance to Default Device
      2) Load ClientApplet and create an instance to Default Device
      3) Select ClientApplet and send:
      0x80 0x10 0x00 0x00 0x00 0x7F;
      The return status word is 0x7F00, which means I was failed to retrieve the shareable object. Which part did I do wrong or did I left out some crucial parts? Thanks in advace.

      Edited by: andirady on Dec 5, 2012 9:30 PM