[android-developers] Re: REST + JSON Web Service Client

2008-09-03 Thread Francisco

Hi everybody!

I finally was able to call the web service i wanted from my
application, i have a problem now.


The String i get from the response method is removing my xml tags. I
get Strings like the following:


?xml version=1.0 encoding=utf-8?
string xmlns=http://tempuri.org/;lt;STKDVgt;lt;TABLEDEF
NAME=authorsgt;


Instead of:


  ?xml version=1.0 encoding=utf-8 ?
  string xmlns=http://tempuri.org/;STKDVTABLEDEF
NAME=authors


Does anyboydy knows hows to aviod this or why is this happening? if i
call the web service from ksoap this doesnt happens but my ksoap
project doest work since the new SDK.


Any help that you could give me will be appreciated.


Thanks


Francisco Ortega


On Aug 25, 11:12 am, Megha Joshi [EMAIL PROTECTED] wrote:
    This might help...

     JSONObject mLocationJSON = createLocationJSON(mLatitude,  mLongitude,
 mDateTime);
     postLocationJSON(SERVER_URL, mLocationJSON);

     /**
      * @param mUrl The URL of location tracking server.
      * @param mLocationJSON The location data with time in JSON format.
      */
     public void postLocationJSON(String mUrl, JSONObject mLocationJSON) {
        HttpClient httpClient = new DefaultHttpClient();
        HttpPost postMethod = new HttpPost(mUrl);
         try {
        // prepare parameters
           HttpParams params = new BasicHttpParams();
           params.setParameter(locationJSON, mLocationJSON.toString());
             postMethod.setParams(params);
             httpClient.execute(postMethod);
             Log.i(TAG, Post request, data:  + mLocationJSON.toString());
         } catch (Exception e) {
             Log.e(Exception, e.getMessage());
         } finally {
             postMethod.abort();
         }
     }

    /**
      * @param mLatitude The latitude data received from location update sent
 by
      *        LocationManager Service.
      * @param mLongitude The longitude received from location update sent by
      *        LocationManager Service.
      * @param mDateTime The DateTime at which location update was sent.
      * @return JSONObject The JSONObject holding latitude,longitude reported
 by
      *         the LocationManager Service and DateTime in RFC3339 format.
      */
     public JSONObject createLocationJSON(double mLatitude, double
 mLongitude,
             String mDateTime) {
         JSONObject mLocationJSON = new JSONObject();
         try {
             mLocationJSON.put(latitude, mLatitude);
             mLocationJSON.put(longitude, mLongitude);
             mLocationJSON.put(date, mDateTime);
         } catch (JSONException ex) {
             Log.e(TAG, Error in creating Location JSON object.);
         }
         return mLocationJSON;
     }

 2008/8/25 Baran [EMAIL PROTECTED]





  Hello Jeffrey,

  I was wondering if you could provide me something about how you
  appended your JSON string to the web service request. I am trying to
  communicate with this rest web service via POST method. But I am
  unable to identify how to append the JSON string as the parameters.
  Object.setParameter is not working in this scenario...

  Hope to hear from you soon!!

  On Aug 21, 10:12 am, Jeffrey Sharkey [EMAIL PROTECTED]
  wrote:
   Just a heads up that I've been using simpleJSON with Android, and
   it's working pretty well.  It's somewhat nicer than the defaultJSON
   included in the SDK because it's iterator-able, making for slick code:

   for(JSONValue value : (JSONArray)JSONValue.parse(string)) {
       JSONObject obj = (JSONObject)value;
       ...

   }

  http://www.json.org/java/simple.txt

   j

   On Aug 20, 11:00 pm, Baran [EMAIL PROTECTED] wrote:

Hi,

Thanks for the reply, actually I was confused with how we can use
   JSON. I suppose this is for manipulating the response we get after a
successfulwebservicerequest. Please correct me if I am wrong. Still
new to this thing.

On Aug 20, 7:00 pm, Mark Murphy [EMAIL PROTECTED] wrote:

 Baran wrote:
  Hi,

  I need to access a .NetwebserviceinRestformat usingJSON. I m
  pretty new to this concept and very much confused about how this
  works

  Any one who can give an overview of the two. I need the steps that
  I
  need to follow to useJSON. Right now my doubt is how to useJSONto
  grab to output. Lets say we create a httpclientand it get the
  respone now what?

  How can we use theJSONobject to manipulate the response...

 There is aJSONparser built into Android:

 http://code.google.com/android/reference/org/json/package-summary.html

 And there is an HTTPclientbuilt into Android:

 http://code.google.com/android/reference/org/apache/http/package-summ...

 though you may wish to view the HttpClient documentation here:

http://hc.apache.org/

 Both of these are open source projects with their own documentation,
  on
 top of what is in Android. Both are usable in other Java projects
 outside of Android.

 If you have specific 

[android-developers] Re: REST + JSON Web Service Client

2008-09-02 Thread Francisco

Hi everybody!

I finally was able to call the .NET web service i wanted from my
application, i have a problem now.


The String i get from the response method is removing my xml tags. I
get Strings like the following:


?xml version=1.0 encoding=utf-8?
string xmlns=http://tempuri.org/;lt;STKDVgt;lt;TABLEDEF
NAME=authorsgt;


Instead of:


  ?xml version=1.0 encoding=utf-8 ?
  string xmlns=http://tempuri.org/;STKDVTABLEDEF
NAME=authors


Does anyboydy knows hows to aviod this or why is this happening? if i
call the web service from ksoap this doesnt happens but my ksoap
project doest work since the new SDK.


Any help that you could give me will be really appreciated.


Thanks


Francisco Ortega


On Aug 25, 11:12 am, Megha Joshi [EMAIL PROTECTED] wrote:
    This might help...

     JSONObject mLocationJSON = createLocationJSON(mLatitude,  mLongitude,
 mDateTime);
     postLocationJSON(SERVER_URL, mLocationJSON);

     /**
      * @param mUrl The URL of location tracking server.
      * @param mLocationJSON The location data with time in JSON format.
      */
     public void postLocationJSON(String mUrl, JSONObject mLocationJSON) {
        HttpClient httpClient = new DefaultHttpClient();
        HttpPost postMethod = new HttpPost(mUrl);
         try {
        // prepare parameters
           HttpParams params = new BasicHttpParams();
           params.setParameter(locationJSON, mLocationJSON.toString());
             postMethod.setParams(params);
             httpClient.execute(postMethod);
             Log.i(TAG, Post request, data:  + mLocationJSON.toString());
         } catch (Exception e) {
             Log.e(Exception, e.getMessage());
         } finally {
             postMethod.abort();
         }
     }

    /**
      * @param mLatitude The latitude data received from location update sent
 by
      *        LocationManager Service.
      * @param mLongitude The longitude received from location update sent by
      *        LocationManager Service.
      * @param mDateTime The DateTime at which location update was sent.
      * @return JSONObject The JSONObject holding latitude,longitude reported
 by
      *         the LocationManager Service and DateTime in RFC3339 format.
      */
     public JSONObject createLocationJSON(double mLatitude, double
 mLongitude,
             String mDateTime) {
         JSONObject mLocationJSON = new JSONObject();
         try {
             mLocationJSON.put(latitude, mLatitude);
             mLocationJSON.put(longitude, mLongitude);
             mLocationJSON.put(date, mDateTime);
         } catch (JSONException ex) {
             Log.e(TAG, Error in creating Location JSON object.);
         }
         return mLocationJSON;
     }

 2008/8/25 Baran [EMAIL PROTECTED]





  Hello Jeffrey,

  I was wondering if you could provide me something about how you
  appended your JSON string to the web service request. I am trying to
  communicate with this rest web service via POST method. But I am
  unable to identify how to append the JSON string as the parameters.
  Object.setParameter is not working in this scenario...

  Hope to hear from you soon!!

  On Aug 21, 10:12 am, Jeffrey Sharkey [EMAIL PROTECTED]
  wrote:
   Just a heads up that I've been using simpleJSON with Android, and
   it's working pretty well.  It's somewhat nicer than the defaultJSON
   included in the SDK because it's iterator-able, making for slick code:

   for(JSONValue value : (JSONArray)JSONValue.parse(string)) {
       JSONObject obj = (JSONObject)value;
       ...

   }

  http://www.json.org/java/simple.txt

   j

   On Aug 20, 11:00 pm, Baran [EMAIL PROTECTED] wrote:

Hi,

Thanks for the reply, actually I was confused with how we can use
   JSON. I suppose this is for manipulating the response we get after a
successfulwebservicerequest. Please correct me if I am wrong. Still
new to this thing.

On Aug 20, 7:00 pm, Mark Murphy [EMAIL PROTECTED] wrote:

 Baran wrote:
  Hi,

  I need to access a .NetwebserviceinRestformat usingJSON. I m
  pretty new to this concept and very much confused about how this
  works

  Any one who can give an overview of the two. I need the steps that
  I
  need to follow to useJSON. Right now my doubt is how to useJSONto
  grab to output. Lets say we create a httpclientand it get the
  respone now what?

  How can we use theJSONobject to manipulate the response...

 There is aJSONparser built into Android:

 http://code.google.com/android/reference/org/json/package-summary.html

 And there is an HTTPclientbuilt into Android:

 http://code.google.com/android/reference/org/apache/http/package-summ...

 though you may wish to view the HttpClient documentation here:

http://hc.apache.org/

 Both of these are open source projects with their own documentation,
  on
 top of what is in Android. Both are usable in other Java projects
 outside of Android.

 If you have 

[android-developers] Re: REST + JSON Web Service Client

2008-08-25 Thread Baran

Hello Jeffrey,

I was wondering if you could provide me something about how you
appended your JSON string to the web service request. I am trying to
communicate with this rest web service via POST method. But I am
unable to identify how to append the JSON string as the parameters.
Object.setParameter is not working in this scenario...

Hope to hear from you soon!!

On Aug 21, 10:12 am, Jeffrey Sharkey [EMAIL PROTECTED]
wrote:
 Just a heads up that I've been using simpleJSON with Android, and
 it's working pretty well.  It's somewhat nicer than the defaultJSON
 included in the SDK because it's iterator-able, making for slick code:

 for(JSONValue value : (JSONArray)JSONValue.parse(string)) {
 JSONObject obj = (JSONObject)value;
 ...

 }

 http://www.json.org/java/simple.txt

 j

 On Aug 20, 11:00 pm, Baran [EMAIL PROTECTED] wrote:





  Hi,

  Thanks for the reply, actually I was confused with how we can use
 JSON. I suppose this is for manipulating the response we get after a
  successfulwebservicerequest. Please correct me if I am wrong. Still
  new to this thing.

  On Aug 20, 7:00 pm, Mark Murphy [EMAIL PROTECTED] wrote:

   Baran wrote:
Hi,

I need to access a .NetwebserviceinRestformat usingJSON. I m
pretty new to this concept and very much confused about how this
works

Any one who can give an overview of the two. I need the steps that I
need to follow to useJSON. Right now my doubt is how to useJSONto
grab to output. Lets say we create a httpclientand it get the
respone now what?

How can we use theJSONobject to manipulate the response...

   There is aJSONparser built into Android:

  http://code.google.com/android/reference/org/json/package-summary.html

   And there is an HTTPclientbuilt into Android:

  http://code.google.com/android/reference/org/apache/http/package-summ...

   though you may wish to view the HttpClient documentation here:

  http://hc.apache.org/

   Both of these are open source projects with their own documentation, on
   top of what is in Android. Both are usable in other Java projects
   outside of Android.

   If you have specific questions regarding the use of one or the other,
   particular as it pertains to Android, write back with the details!

   --
   Mark Murphy (a Commons Guy)http://commonsware.com
   Warescription: All titles, revisions,  ebook formats, just $35/year
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: REST + JSON Web Service Client

2008-08-25 Thread Megha Joshi
   This might help...

JSONObject mLocationJSON = createLocationJSON(mLatitude,  mLongitude,
mDateTime);
postLocationJSON(SERVER_URL, mLocationJSON);

/**
 * @param mUrl The URL of location tracking server.
 * @param mLocationJSON The location data with time in JSON format.
 */
public void postLocationJSON(String mUrl, JSONObject mLocationJSON) {
   HttpClient httpClient = new DefaultHttpClient();
   HttpPost postMethod = new HttpPost(mUrl);
try {
   // prepare parameters
  HttpParams params = new BasicHttpParams();
  params.setParameter(locationJSON, mLocationJSON.toString());
postMethod.setParams(params);
httpClient.execute(postMethod);
Log.i(TAG, Post request, data:  + mLocationJSON.toString());
} catch (Exception e) {
Log.e(Exception, e.getMessage());
} finally {
postMethod.abort();
}
}

   /**
 * @param mLatitude The latitude data received from location update sent
by
 *LocationManager Service.
 * @param mLongitude The longitude received from location update sent by
 *LocationManager Service.
 * @param mDateTime The DateTime at which location update was sent.
 * @return JSONObject The JSONObject holding latitude,longitude reported
by
 * the LocationManager Service and DateTime in RFC3339 format.
 */
public JSONObject createLocationJSON(double mLatitude, double
mLongitude,
String mDateTime) {
JSONObject mLocationJSON = new JSONObject();
try {
mLocationJSON.put(latitude, mLatitude);
mLocationJSON.put(longitude, mLongitude);
mLocationJSON.put(date, mDateTime);
} catch (JSONException ex) {
Log.e(TAG, Error in creating Location JSON object.);
}
return mLocationJSON;
}

2008/8/25 Baran [EMAIL PROTECTED]


 Hello Jeffrey,

 I was wondering if you could provide me something about how you
 appended your JSON string to the web service request. I am trying to
 communicate with this rest web service via POST method. But I am
 unable to identify how to append the JSON string as the parameters.
 Object.setParameter is not working in this scenario...

 Hope to hear from you soon!!

 On Aug 21, 10:12 am, Jeffrey Sharkey [EMAIL PROTECTED]
 wrote:
  Just a heads up that I've been using simpleJSON with Android, and
  it's working pretty well.  It's somewhat nicer than the defaultJSON
  included in the SDK because it's iterator-able, making for slick code:
 
  for(JSONValue value : (JSONArray)JSONValue.parse(string)) {
  JSONObject obj = (JSONObject)value;
  ...
 
  }
 
  http://www.json.org/java/simple.txt
 
  j
 
  On Aug 20, 11:00 pm, Baran [EMAIL PROTECTED] wrote:
 
 
 
 
 
   Hi,
 
   Thanks for the reply, actually I was confused with how we can use
  JSON. I suppose this is for manipulating the response we get after a
   successfulwebservicerequest. Please correct me if I am wrong. Still
   new to this thing.
 
   On Aug 20, 7:00 pm, Mark Murphy [EMAIL PROTECTED] wrote:
 
Baran wrote:
 Hi,
 
 I need to access a .NetwebserviceinRestformat usingJSON. I m
 pretty new to this concept and very much confused about how this
 works
 
 Any one who can give an overview of the two. I need the steps that
 I
 need to follow to useJSON. Right now my doubt is how to useJSONto
 grab to output. Lets say we create a httpclientand it get the
 respone now what?
 
 How can we use theJSONobject to manipulate the response...
 
There is aJSONparser built into Android:
 
   
 http://code.google.com/android/reference/org/json/package-summary.html
 
And there is an HTTPclientbuilt into Android:
 
   
 http://code.google.com/android/reference/org/apache/http/package-summ...
 
though you may wish to view the HttpClient documentation here:
 
   http://hc.apache.org/
 
Both of these are open source projects with their own documentation,
 on
top of what is in Android. Both are usable in other Java projects
outside of Android.
 
If you have specific questions regarding the use of one or the other,
particular as it pertains to Android, write back with the details!
 
--
Mark Murphy (a Commons Guy)http://commonsware.com
Warescription: All titles, revisions,  ebook formats, just $35/year
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: REST + JSON Web Service Client

2008-08-25 Thread Baran

Hi,

thanks for the reply, the thing I was asking was how to send the data
as stream...i.e I have this JSON string and I need to send it to a web
service in the form of a stream...I already tried using the above
method and was fine with that..but the requirement is to send as a
serialized stream

Any idea bout that

Hope to hear from you soon!!!

On Aug 25, 11:12 pm, Megha Joshi [EMAIL PROTECTED] wrote:
This might help...

 JSONObject mLocationJSON = createLocationJSON(mLatitude,  mLongitude,
 mDateTime);
 postLocationJSON(SERVER_URL, mLocationJSON);

 /**
  * @param mUrl The URL of location tracking server.
  * @param mLocationJSON The location data with time in JSON format.
  */
 public void postLocationJSON(String mUrl, JSONObject mLocationJSON) {
HttpClient httpClient = new DefaultHttpClient();
HttpPost postMethod = new HttpPost(mUrl);
 try {
// prepare parameters
   HttpParams params = new BasicHttpParams();
   params.setParameter(locationJSON, mLocationJSON.toString());
 postMethod.setParams(params);
 httpClient.execute(postMethod);
 Log.i(TAG, Post request, data:  + mLocationJSON.toString());
 } catch (Exception e) {
 Log.e(Exception, e.getMessage());
 } finally {
 postMethod.abort();
 }
 }

/**
  * @param mLatitude The latitude data received from location update sent
 by
  *LocationManager Service.
  * @param mLongitude The longitude received from location update sent by
  *LocationManager Service.
  * @param mDateTime The DateTime at which location update was sent.
  * @return JSONObject The JSONObject holding latitude,longitude reported
 by
  * the LocationManager Service and DateTime in RFC3339 format.
  */
 public JSONObject createLocationJSON(double mLatitude, double
 mLongitude,
 String mDateTime) {
 JSONObject mLocationJSON = new JSONObject();
 try {
 mLocationJSON.put(latitude, mLatitude);
 mLocationJSON.put(longitude, mLongitude);
 mLocationJSON.put(date, mDateTime);
 } catch (JSONException ex) {
 Log.e(TAG, Error in creating Location JSON object.);
 }
 return mLocationJSON;
 }

 2008/8/25 Baran [EMAIL PROTECTED]



  Hello Jeffrey,

  I was wondering if you could provide me something about how you
  appended your JSON string to the web service request. I am trying to
  communicate with this rest web service via POST method. But I am
  unable to identify how to append the JSON string as the parameters.
  Object.setParameter is not working in this scenario...

  Hope to hear from you soon!!

  On Aug 21, 10:12 am, Jeffrey Sharkey [EMAIL PROTECTED]
  wrote:
   Just a heads up that I've been using simpleJSON with Android, and
   it's working pretty well.  It's somewhat nicer than the defaultJSON
   included in the SDK because it's iterator-able, making for slick code:

   for(JSONValue value : (JSONArray)JSONValue.parse(string)) {
   JSONObject obj = (JSONObject)value;
   ...

   }

  http://www.json.org/java/simple.txt

   j

   On Aug 20, 11:00 pm, Baran [EMAIL PROTECTED] wrote:

Hi,

Thanks for the reply, actually I was confused with how we can use
   JSON. I suppose this is for manipulating the response we get after a
successfulwebservicerequest. Please correct me if I am wrong. Still
new to this thing.

On Aug 20, 7:00 pm, Mark Murphy [EMAIL PROTECTED] wrote:

 Baran wrote:
  Hi,

  I need to access a .NetwebserviceinRestformat usingJSON. I m
  pretty new to this concept and very much confused about how this
  works

  Any one who can give an overview of the two. I need the steps that
  I
  need to follow to useJSON. Right now my doubt is how to useJSONto
  grab to output. Lets say we create a httpclientand it get the
  respone now what?

  How can we use theJSONobject to manipulate the response...

 There is aJSONparser built into Android:

 http://code.google.com/android/reference/org/json/package-summary.html

 And there is an HTTPclientbuilt into Android:

 http://code.google.com/android/reference/org/apache/http/package-summ...

 though you may wish to view the HttpClient documentation here:

http://hc.apache.org/

 Both of these are open source projects with their own documentation,
  on
 top of what is in Android. Both are usable in other Java projects
 outside of Android.

 If you have specific questions regarding the use of one or the other,
 particular as it pertains to Android, write back with the details!

 --
 Mark Murphy (a Commons Guy)http://commonsware.com
 Warescription: All titles, revisions,  ebook formats, just $35/year
--~--~-~--~~~---~--~~
You received this message because 

[android-developers] Re: REST + JSON Web Service Client

2008-08-22 Thread Baran

Hi Charun,

thanks for the reply, Everything changed since my last post ..:)

I worked pretty good on android sdk m5 for JSON, and as soon as I got
success in it , here is the new SDK with quite a few changes in it.

Now I am stuck with the things...

Please visit for the details and take a look at the things...
http://groups.google.co.in/group/android-developers/browse_thread/thread/27a46468c1b68070#



On Aug 21, 12:18 pm, cbraun75 [EMAIL PROTECTED] wrote:
 Yes the Yelp.com offer a API withJSON response (http://www.yelp.com/
 developers)

 Cu

 Christian

 On 21 Aug., 07:12, Baran [EMAIL PROTECTED] wrote:

  Anyone having any test web service link that provide response inJSON
  format. Need one to test the clinet.

  On Aug 21, 10:00 am, Baran [EMAIL PROTECTED] wrote:

   Hi,

   Thanks for the reply, actually I was confused with how we can use
  JSON. I suppose this is for manipulating the response we get after a
   successful web service request. Please correct me if I am wrong. Still
   new to this thing.

   On Aug 20, 7:00 pm, Mark Murphy [EMAIL PROTECTED] wrote:

Baran wrote:
 Hi,

 I need to access a .Net web service in Rest format usingJSON. I m
 pretty new to this concept and very much confused about how this
 works

 Any one who can give an overview of the two. I need the steps that I
 need to follow to useJSON. Right now my doubt is how to useJSONto
 grab to output. Lets say we create a http client and it get the
 respone now what?

 How can we use theJSONobject to manipulate the response...

There is aJSONparser built into Android:

   http://code.google.com/android/reference/org/json/package-summary.html

And there is an HTTP client built into Android:

   http://code.google.com/android/reference/org/apache/http/package-summ...

though you may wish to view the HttpClient documentation here:

   http://hc.apache.org/

Both of these are open source projects with their own documentation, on
top of what is in Android. Both are usable in other Java projects
outside of Android.

If you have specific questions regarding the use of one or the other,
particular as it pertains to Android, write back with the details!

--
Mark Murphy (a Commons Guy)http://commonsware.com
Warescription: All titles, revisions,  ebook formats, just $35/year
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: REST + JSON Web Service Client

2008-08-21 Thread cbraun75

Yes the Yelp.com offer a API with JSON  response (http://www.yelp.com/
developers)

Cu

Christian

On 21 Aug., 07:12, Baran [EMAIL PROTECTED] wrote:
 Anyone having any test web service link that provide response in JSON
 format. Need one to test the clinet.

 On Aug 21, 10:00 am, Baran [EMAIL PROTECTED] wrote:

  Hi,

  Thanks for the reply, actually I was confused with how we can use
  JSON. I suppose this is for manipulating the response we get after a
  successful web service request. Please correct me if I am wrong. Still
  new to this thing.

  On Aug 20, 7:00 pm, Mark Murphy [EMAIL PROTECTED] wrote:

   Baran wrote:
Hi,

I need to access a .Net web service in Rest format using JSON. I m
pretty new to this concept and very much confused about how this
works

Any one who can give an overview of the two. I need the steps that I
need to follow to use JSON. Right now my doubt is how to use JSON to
grab to output. Lets say we create a http client and it get the
respone now what?

How can we use the JSON object to manipulate the response...

   There is a JSON parser built into Android:

  http://code.google.com/android/reference/org/json/package-summary.html

   And there is an HTTP client built into Android:

  http://code.google.com/android/reference/org/apache/http/package-summ...

   though you may wish to view the HttpClient documentation here:

  http://hc.apache.org/

   Both of these are open source projects with their own documentation, on
   top of what is in Android. Both are usable in other Java projects
   outside of Android.

   If you have specific questions regarding the use of one or the other,
   particular as it pertains to Android, write back with the details!

   --
   Mark Murphy (a Commons Guy)http://commonsware.com
   Warescription: All titles, revisions,  ebook formats, just $35/year
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: REST + JSON Web Service Client

2008-08-20 Thread Baran

Hi,

Thanks for the reply, actually I was confused with how we can use
JSON. I suppose this is for manipulating the response we get after a
successful web service request. Please correct me if I am wrong. Still
new to this thing.

On Aug 20, 7:00 pm, Mark Murphy [EMAIL PROTECTED] wrote:
 Baran wrote:
  Hi,

  I need to access a .Net web service in Rest format using JSON. I m
  pretty new to this concept and very much confused about how this
  works

  Any one who can give an overview of the two. I need the steps that I
  need to follow to use JSON. Right now my doubt is how to use JSON to
  grab to output. Lets say we create a http client and it get the
  respone now what?

  How can we use the JSON object to manipulate the response...

 There is a JSON parser built into Android:

 http://code.google.com/android/reference/org/json/package-summary.html

 And there is an HTTP client built into Android:

 http://code.google.com/android/reference/org/apache/http/package-summ...

 though you may wish to view the HttpClient documentation here:

 http://hc.apache.org/

 Both of these are open source projects with their own documentation, on
 top of what is in Android. Both are usable in other Java projects
 outside of Android.

 If you have specific questions regarding the use of one or the other,
 particular as it pertains to Android, write back with the details!

 --
 Mark Murphy (a Commons Guy)http://commonsware.com
 Warescription: All titles, revisions,  ebook formats, just $35/year
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: REST + JSON Web Service Client

2008-08-20 Thread Jeffrey Sharkey

Just a heads up that I've been using simple JSON with Android, and
it's working pretty well.  It's somewhat nicer than the default JSON
included in the SDK because it's iterator-able, making for slick code:

for(JSONValue value : (JSONArray)JSONValue.parse(string)) {
JSONObject obj = (JSONObject)value;
...
}

http://www.json.org/java/simple.txt

j

On Aug 20, 11:00 pm, Baran [EMAIL PROTECTED] wrote:
 Hi,

 Thanks for the reply, actually I was confused with how we can use
 JSON. I suppose this is for manipulating the response we get after a
 successful web service request. Please correct me if I am wrong. Still
 new to this thing.

 On Aug 20, 7:00 pm, Mark Murphy [EMAIL PROTECTED] wrote:

  Baran wrote:
   Hi,

   I need to access a .Net web service in Rest format using JSON. I m
   pretty new to this concept and very much confused about how this
   works

   Any one who can give an overview of the two. I need the steps that I
   need to follow to use JSON. Right now my doubt is how to use JSON to
   grab to output. Lets say we create a http client and it get the
   respone now what?

   How can we use the JSON object to manipulate the response...

  There is a JSON parser built into Android:

 http://code.google.com/android/reference/org/json/package-summary.html

  And there is an HTTP client built into Android:

 http://code.google.com/android/reference/org/apache/http/package-summ...

  though you may wish to view the HttpClient documentation here:

 http://hc.apache.org/

  Both of these are open source projects with their own documentation, on
  top of what is in Android. Both are usable in other Java projects
  outside of Android.

  If you have specific questions regarding the use of one or the other,
  particular as it pertains to Android, write back with the details!

  --
  Mark Murphy (a Commons Guy)http://commonsware.com
  Warescription: All titles, revisions,  ebook formats, just $35/year


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: REST + JSON Web Service Client

2008-08-20 Thread Baran

Anyone having any test web service link that provide response in JSON
format. Need one to test the clinet.

On Aug 21, 10:00 am, Baran [EMAIL PROTECTED] wrote:
 Hi,

 Thanks for the reply, actually I was confused with how we can use
 JSON. I suppose this is for manipulating the response we get after a
 successful web service request. Please correct me if I am wrong. Still
 new to this thing.

 On Aug 20, 7:00 pm, Mark Murphy [EMAIL PROTECTED] wrote:

  Baran wrote:
   Hi,

   I need to access a .Net web service in Rest format using JSON. I m
   pretty new to this concept and very much confused about how this
   works

   Any one who can give an overview of the two. I need the steps that I
   need to follow to use JSON. Right now my doubt is how to use JSON to
   grab to output. Lets say we create a http client and it get the
   respone now what?

   How can we use the JSON object to manipulate the response...

  There is a JSON parser built into Android:

 http://code.google.com/android/reference/org/json/package-summary.html

  And there is an HTTP client built into Android:

 http://code.google.com/android/reference/org/apache/http/package-summ...

  though you may wish to view the HttpClient documentation here:

 http://hc.apache.org/

  Both of these are open source projects with their own documentation, on
  top of what is in Android. Both are usable in other Java projects
  outside of Android.

  If you have specific questions regarding the use of one or the other,
  particular as it pertains to Android, write back with the details!

  --
  Mark Murphy (a Commons Guy)http://commonsware.com
  Warescription: All titles, revisions,  ebook formats, just $35/year
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---