Tuesday, February 28, 2012

[android-developers] how to send jsonarray to webservice?

Hello,

here i created URL dynamically in my code like this......

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 ;


here "xyz" which is at the last of query content jsonarray like this:[{"id":5,"Quantity":4,"comment":""}]


now whwnever i am create uri usaing URIUtils.CreateUri it will return me null then what is the problem i don't know?

uri = URIUtils.createURI(ServiceUtils.SCHEME, ServiceUtils.HOST, ServiceUtils.PORT, ServiceUtils.GetAllMenuCategoriesService_PATH_ABSTRACT, query, ServiceUtils.FRAGMENT);



can anyonehelp me? 





My url is like this::


I have to send this jsonarray to my webservice but it can't work bcz of the above problem.

--
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment