Issue with Java API
Posted: Wed Aug 22, 2012 3:34 pm
Hi,
I hope this is not a dumb question. I am a novice developer, having trouble understanding your documentation and getting this service to work.
Here is how I tried to implement your example.
In the servlet file add the following import statements:
import com.scientiamobile.wurflcloud.CloudClientLoader;
import com.scientiamobile.wurflcloud.CloudClientManager;
import com.scientiamobile.wurflcloud.device.AbstractDevice;
Now, add the following properties:
private static final String API_KEY = "xxxxxx:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
private CloudClientManager cloudManager;
Replace xxxxxx:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx with your API Key in the API_KEY property.
In the servlet init() method insert the following in the try block:
CloudClientLoader loader = new CloudClientLoader(API_KEY);
manager = loader.getClientManager();
...etc.
Even just the initialization with new CloudClientLoader causes my application to fail. I can't log a decent error either. No useful info is given. Is there known issues with the Java API? Can you provide some better examples so I can get started?
I am deploying the app in Jetty 6.1.x. I know the documentation states use of Tomcat, but I don't see how that would cause a problem.
Thank you,
Steve
I hope this is not a dumb question. I am a novice developer, having trouble understanding your documentation and getting this service to work.
Here is how I tried to implement your example.
In the servlet file add the following import statements:
import com.scientiamobile.wurflcloud.CloudClientLoader;
import com.scientiamobile.wurflcloud.CloudClientManager;
import com.scientiamobile.wurflcloud.device.AbstractDevice;
Now, add the following properties:
private static final String API_KEY = "xxxxxx:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
private CloudClientManager cloudManager;
Replace xxxxxx:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx with your API Key in the API_KEY property.
In the servlet init() method insert the following in the try block:
CloudClientLoader loader = new CloudClientLoader(API_KEY);
manager = loader.getClientManager();
...etc.
Even just the initialization with new CloudClientLoader causes my application to fail. I can't log a decent error either. No useful info is given. Is there known issues with the Java API? Can you provide some better examples so I can get started?
I am deploying the app in Jetty 6.1.x. I know the documentation states use of Tomcat, but I don't see how that would cause a problem.
Thank you,
Steve