hi, u change json array to json stringify Enjoy
Moktarul Anam On Tuesday, 13 March 2012 11:31:34 UTC+5:30, Mulsaniya Bhadresh wrote: > > hello friends, > > i have problem with my service and it will return null when i sent > httppost request to server....i don't know what is the problem. > > I am here explain what is happen inside my code... > > String query = "" + ServiceUtils.KEY_methodnameForPlaceOrder + "=" + > ServiceUtils.KEY_PlaceOrderMethodName + "&" + ServiceUtils.KEY_InstanceId + > "=" + request.instanceID + "&" +ServiceUtils.KEY_CustomerId + "=" > +request.CustomerID + "&" + ServiceUtils.KEY_TableIdForPlaceOrder + "=" > +request.tableID + "&" +ServiceUtils.KEY_QuantityandItemId + "=" +xyz ; > > and it will generate query like > this::MethodName=InsertOrderForTable&InstanceId=1&CustomerId=1&TableID=5&quantityAndItemID=[{"id":5,"Quantity":4,"comment":""}] > > here this is my query string and it will be useful for creation of my url > which will be useful for sending request to server. > and here xyz variable is nothing but my jsonarray which i want to send to > server .and it is somthing like this::[{"id":5,"Quantity":4,"comment":""}] > > > now i want to generate complete url so i am using URIUtils.CreateUri and > code is somthing like this...... > > URI uri = URIUtils.createURI(ServiceUtils.SCHEME, ServiceUtils.HOST, > ServiceUtils.PORT, ServiceUtils.GetAllMenuCategoriesService_PATH_ABSTRACT, > query, ServiceUtils.FRAGMENT); > > > and here query string is which is mentioned above.... > > > when this second statement execute it will return me null ......i don't > know what is the problem... > > My final url is somthing like this.:;; > http://192.168.1.4:55106/Waiter_json.aspx?MethodName=InsertOrderForTable&InstanceId=1&CustomerId=1&TableID=5&quantityAndItemID=[{ > "id":5,"Quantity":4,"comment":""},{"id":4,"Quantity":1,"comment":""},{"id":27,"Quantity":3,"comment":""}] > > > when i paste this url in browser then it will give me complete response.... > > > if anyone knows what is the problem here please reply me ASAP. > -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en