| The aim of this step is to:
|
| After completing this step you will be able to:
|
| For this, you will use the following tools:
|
For this step, you will need the files available in the Files needed for this Usability Lab section.
If you select a Movie in the list of current moviews, an SMS is sent to the Server. This Mobile Originated (MO) SMS contains the ID of the Movie. You may see this from the Mobile Simulator, sending the SMS:
And also from the Server Simulator, receiving the SMS.
The Server should send back the information about this Movie, i.e. a short description and the show times for today. For this, let's create an Agent.
We will label our Agent 'IOD_Movie_2'.
We then define that our Agent will return some Text through SMS:
Here is the text we want to send:
| A war re-erupts on Earth between two robotic clans. 14:00 - 17:45 - 22:00 |
And the server will send this information when the message data of the SMS it receives contains 'getShowtime*2':
Do not forget to activate this Agent:
Now, if we select our movie 'Transformers' again, the server receives the SMS and sends back the information to the Mobile Simulator.
In the Mobile Simulator, we see that a new SMS has been received.
If we double click the icon, we may see the content of this SMS.
This nice and easy but we would have to define this agent for 'GetShowtime*1', 'GetShowtime*2', 'GetShowtime*3', 'GetShowtime*4', etc. Not so convenient... We will try another strategy for the next feature.
The next feature of our Solution is to retrieve the Phone Numbers of Zyrcon Cinemas from the Server. The User will go to the Cinemas STK menu and choose the entry 'Add a cinema'. The Applet would then ask him to input the name of a city and an SMS would then be sent to the IOD Server.
Instead of an Agent, we will use a Java Server Application.
For this, create a new Project in your Eclipse Worksapce. This Project is not a Javacard Project but a usual Java Project. For the creation of your Server Application you may refer to the User Guide located in the directory:
C:\Program Files\Gemalto\Simulation Chain 2G\conf\serversimulator\shared
The main class of your Server Application will implement the IServerApplication interface.
| package com.gemalto.examples; import com.gemplus.gsm.serversimulator.applet.external.*; public class CinemasManager implements IServerApplication { public boolean SMSSubmitReceived(ShortMessage arg0) { // TODO Auto-generated method stub return false; } public ShortMessage generateSMSDelivery() { // TODO Auto-generated method stub return null; } public String getName() { // TODO Auto-generated method stub return null; } } |
public String getName()
The user can provide a name for his own server side application
public boolean SMSSubmitReceived(ShortMessage paramMessage)
Whenever a SMS-submit is sent from Mobile Simulator, Server Simulator will call this method to forward this short message to the user's server side application, so that the user can analyze the data of the message. If the user's server side application wants to send back a SMS-Delivery, it should return true in this method and provide the SMS-Delivery in the following method.
public ShortMessage generateSMSDelivery()
If the user's server side application decides to send back a SMS-Delivery to the Mobile Simulator, it should return the short message using this method. After the Server Simulator checks the SMSSubmitReceived method returns true, it will call this method to get the short message.
Again, the purpose of this Usability Lab is not to teach you how to develop Java Applications but how to use the Developer Suite to develop your Wireless Solutions. Therefore, we provide you a functional CinemaManager Server Application (available in the archive in the Files needed for this Usability Lab section), import it in your Eclipse Workspace as a normal Java Project.
Now, go back to your Server Simulator and click on the 'Import a Server Application' button.
Browse and open your new 'ZyrconCinemas-ServerSide' Java Project Directory. The Server Simulator will recognize one Server Application: com.gemalto.examples.CinemasManager. Click Finish to import it.
Make sure you activate it and then go back to the Messages tab of the Server Simulator.
Now, go back to your Mobile Simulator and request the addition of the cinema for Beijing. In your Server Simulator, you will first see an incomming Text Message and then an outgoing Data Message.
The details of the Text Message show that the Server received the request "getCinema*Beijing"
The details of the Data Message show the OTA APDU that have been sent to the Card, that it was handled directly by the Card Manager and processed successfully with the last Status Word being 90 00.
If you go back to the Cinemas menu in the Mobile Simulator, you will see the additional entry for Beijing.
If we select the Beijing Zyrcon Cinema, the Applet automatically Setups a Call and a new Mobile Simulator is opened for you to either pick up the call or reject it.
Our Zyrcon Cinema Wireless Solution is working fine in our Simulated Environment.
With the full version, you may now proceed with the deployment of your Applets and Libraries on a Real Card.
For this, you will need a proper License that you may buy on the Gemalto Web Store in the 'Kits & Software' section.

