I am trying to consume my newly setup RESTful WCF service, located at

[http://196.34.92.60/api/api/v1/public.svc/getoperators]

I accessed it using some third party tools, which I grabbed from

http://code.google.com/a/eclipselabs.org/p/restclient-tool/

https://addons.mozilla.org/en-US/firefox/addon/restclient/

and my results look like I expected:

{
   "Results":
   [
       "golden arrow",
       "jammie",
       "myciti"
   ]
}


All fine and well.  When I just type the url into my web browser, the response is

&lt;ResultList xmlns="http://schemas.datacontract.org/2004/07/Developer_Portal"xmlns:i="http://www.w3.org/2001/XMLSchema-instance"&gt;&lt;Results xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays"&gt;&lt;a:string&gt;golden arrow&lt;/a:string&gt;&lt;a:string&gt;jammie&lt;/a:string&gt;&lt;a:string&gt;myciti&lt;/a:string&gt;&lt;/Results&gt;&lt;/ResultList&gt;


Not what I expected, but I assumed  this was normal, and tried to comsume service in Javascript (here is fiddle)

http://jsfiddle.net/JmTe4/11/

It responds with an error.  At this point I'm stumped: what do I need to do to get the desired response in javascript?


Question: Add class via command line
Answer: There are no tools to create java classes in an Android project. You can however create a new android project with the sdk tools and modify it to some extent. 

Well, if you really want to do it via the command line:

$ cd myapplication/
$ cd src/
$ cd main/java/my/package/name/


Create the java class:

$ touch SomeClass.java


Add package and the class declaration to the java file:

$ echo "package my.package.name;" &gt;&gt; SomeClass.java 
$ echo "public class SomeClass {}" &gt;&gt; SomeClass.java 


If you want to create another package:

$ mkdir somepackage
$ cd somepackage
$ touch AnotherClass.java


Now if you go into Eclipse everything should be updated.