Frequently Asked Questions

Questions


Answers

  • Is the data transferred to and from a MIDP client encrypted?
    Yes all data is encrypted and compressed to reduce the number of bytes sent to and from the gateway

  • Can I use my own encryption code?
    Yes, you can plugin your own encryption code both on the device and at the gateway - please see the Security Pack documentation for more information

  • Can I turn off the default encryption?
    Yes, the Security Pack provides two basic encryption factories, the default encryption factory and a "null" encryption factory, which does nothing.

  • What is the typical size in bytes of the generated stub classes?
    This depends on the number of methods in the service and the number of user-defined classes that your service uses are parameters.

    Typically the size of the generated stubs is approximately 10kb.

  • We are running the Caboodle gateway and have installed our application on several phones, but sometimes on we get connection exceptions.
    The most likely causes of this problem are

    • The GPRS Internet connection being used by the phone is intermittent or your phone has a GRPS weak signal.
    • The amount of data you are transferring is too large for a particular handset. If you are returning Vectors of objects, then consider adding another method to your service, which returns the size of the Vector first. And the request each element (or batch of elements) in sequential method calls from your MIDlet.

    If the problem in only occurring on a particular type of mobile phone, please contact us with details about the device.

  • I am having problems importing a POJO based service, the Eclipse plugin tell me that one of my classes is not compatible
    The stub generator will only generate code that has CLDC 1.0 compatible type. Some of the methods in your class might be returning incompatible data types, such as doubles or floats. Also check that your class has a public no-args constructor and you have matching getter and setter methods

  • I'm using the NetBeans plugin. I can connect to my RMI service, but the console outputs a ClassNotFoundException
    The most likely cause of this problem is that the NetBeans plugin cannot download the RMI stub for your service. Check that you have started your service with a valid codebase and that your class server is running. If the codebase URL is a JAR then the easiest way to check your codebase settings is to paste the codebase URL into a web browser - the web browser should prompt you to open or save the file. If you get a file not found (404) in the browser then it is likely that you codebase is broken in some respect.

  • Can I use Net Caboodle to connect to a Jini service?
    Yes in v2.5 and above -- use the Caboodle plugin menu and select "New Jini connector"

  • How do the generated stubs know which gateway to connect to?
    When the stubs are generated the IP address of the gateway host are embedded, however, you can use the overloaded version of the service factory to specify the location of the gateway.

    We recommend adding two properties to your JAD file (which are dynamically set when a user downloads your MIDlet) to specify the host and port of the desired gateway. You can then use these at runtime to configure the service factories.


    For example in the JAD file specify the gatewayHost & gatewayPort.

    gatewayHost: 192.168.0.3
    gatewayPort: 8205

    Make sure that you use the Gateway Port (default 8205) and not the Bind port, please check the Gateway Configuration settings to make sure you are using the correct value.

    And then in your MIDlet add code to read these parameters, for example

    String gatewayHost=getAppProperty("gatewayHost");
    String port=getAppProperty("gatewayPort");
    MyService service=MyServiceFactory.getService(gatewayHost,Integer.parseInt(port));

    Please note that if you have a license for Net Caboodle, you can use the "Deploy MIDlet to gateway" menu option and then the gateway will automatically add the gatewayHost & gatewayPort JAD parameters at runtime.

  • Can my mobile client use multiple services from multiple gateways?
    Yes, please refer to the item above for how to configure this. However, we would recommend using a single POJO as a facade to the other services, because this reduces the storage footprint on the device.

  • What is the "New Bean connector" option used for?
    The bean connector allows you to write connector code for any type of service that can be accessed from Java.

    We use the term "connector bean"
    to refer to any POJO (Plain Old Java Object);

    For example, you might have an existing database that you want to make calls on from a mobile client. By creating a POJO Java class that can access the database (via JDBC) it is possible to define the methods on the class that you want to call from a MIDlet - please refer to the
    Database Messaging Example.

  • Where can I find information on licensing and prices?
    Contact us here

  • My POJO service is returning a Vector of user-defined objects - why's isn't the sub generator creating stubs for theses classes?
    The stub generator will only attempt to generate stubs for user-defined types if the service's interface class has at least one method that either takes or returns an instance of this class. This is to cut down on the amount of generated code. The work around is to declare one method that returns an instance of the type you need a stub generated for. For example,

    public MyType getMyType():

    will force the stub generator to attempt to create a stub for "MyType"

  • Is there any example code available to show me how to use the Bean connector?
    Yes,
    click here

  • Do services have to run in the Gateway to be accessible to mobile clients?
    No. Some of the example services do run in the gateway, but that's purely to make trying out the examples much easier.

    For deployed systems the Gateway uses connectors to remote and distributed services that could be running on different machine and in different locations.

  • Can I initiate a transaction on the device that is used by our database server?
    Yes, please refer to the mobile booking example for more information.

  • How is the lifecycle of a transaction managed?
    Please refer to the article "Taking SOA Mobile part II" for more information.

  • After obfuscating my MIDlet I get a "Unsupported type" exception - why is this?
    The most likely cause of this problem is that your service has a method the exports a user-defined class. For example, the Hello RMI service example has a method that returns a class called ServiceInfo from the method call "getServiceInfo()". To fix the problem you need to exclude user-defined classes from being obfuscated.

    If you are obfuscating with ProGuard, then add a line to your config file like this

    -keep public class com.nc.example.ServiceInfo

    Another cause of this problem can be that you have defined a service method to return a Vector of user-defined objects, when you have no explicity methods defined to take a return an object of that type.


  • How can I run the gateway, externally to the NetBeans IDE?
    Use the Gateway deployment option and select a directory on your computer where you want to deploy the gateway to.

  • I have upgraded to a newer version of the NetBeans plugin and I'm now getting "Invalid gateway request" when my MIDlet connects to my service.
    The most likely cause of the problem is because the gateway protocol has been updated and your mobile stubs are using an older protocol version.

    To fix the problem re-generate the mobile stubs and then rebuild your project.

  • I have a service bean that is dependent on another class library, how can I change the classpath of the gateway when it is running in NetBeans?
    You can extend the classpath used by the gateway by using the Net Caboodle plugin's Gateway Configuration/Preferences dialog.

    Having updated the gateways classpath, you must restart the gateway for the changes to take affect.

  • When I call a method on my service the WTK Emulator hangs, how do I fix this problem?
    In your MIDlet, you need to make method calls on your remote Gateway services in a separate Java Thread. This is because the emulator (and on many real devices) will block the user interface thread whist making OTA network calls, which can result in a deadlock on the device.

    If you are using the Net Caboodle plugin for NetBeans, use a WaitScreen object in the Mobility Pack's Flow Designer - please refer to the Mobility Pack documentation for more information.

  • What connection protocol do the mobile stubs use?
    The default connection protocol used by the Net Caboodle mobile stubs is HTTP. This is because HTTP works on a greater number of mobile devices.

    However, the gateway and stubs also support direct TCP/IP socket connections, which can result in faster connections and much less data being transfer OTA.

    To enable the use of TCIP/IP sockets, invoke the following method on the stub factory, for example

    MyServiceFactory.setUseSockets( true );

    Please note that most MIDP-1.0 devices do not support socket connections.

  • In the NetBeans plugin what's the difference between the Port and Bind port in the config dialog box?
    The Gateway Port (default 8205) is the socket listener port used for mobile devices to connect OTA to the Gateway, whereas the Bind port is used as local RMI registry for the Hello example that comes with the plugin.

    It is important when using the overloaded versions of the getService() method, that you use the Gateway port value (default 8205)

  • How can I test my application on my mobile phone?
    To be able to deploy and run your application on your mobile phone, you need to have a computer that is accessible via the Internet, and your Firewall configured so is can accept OTA connections on the gateway's listener port or configure your router to forward requests to the conputer running the gateway.

    For more information please contact us

  • Do you have an academic licensing scheme for research students?
    Yes, Net Caboodle can provide research students and universities with free developer licenses.

    To apply for an academic license Net Caboodle require an email and then a FAX from your university.

    Net Caboodle will not accept any requests for academic licenses from generic email accounts, such as hotmail, gmail, yahoo etc.

    For more information please contact us

  • We have deployed our gateway on port 8100, why doesn't work for all carriers?
    Some carriers only allow outbound Internet connections on port 80. If you have Apache already running on port 80, then you can simply use the proxyPass directive to redirect incoming requests to the gateway running on a different port.

    For example: change the port parameter passed to the stubs to 80/gw, then update your Apache config as shown below.

    proxyPass /gw/ http://localhost:8100

Support

If the above FAQ didn't answer your question please contact us

 

Location pack | Security pack | Transaction Pack | Gateway | Whoosh mobile | NetBeans plugin | Eclipse plugin

 

Copyright notice

The information within this document remains the sole property of Net Caboodle - www.netcaboodle.com

No part of this document may be copied or reproduced in any form or by any means, and the information
contained within it is not to be communicated to a third party, without the prior written consent of
Net Caboodle. All trademarks remain the property of their respective owners. NetCaboodle, Caboodle server
and Raven are all trademarks of Net Caboodle.