Hi friends,
I want to send the some xml data to server. Here I am showing you the
example I tried:
try
{
String s = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
               +"<name>Manoj</name>\n"
               +"<number>123</number>\n"
               +"<school>dmh</school>\n";
String url = "http://localhost:9090/loggerapi.php?data="+s;
HttpClient httpclient = new DefaultHttpClient();
 HttpPost httpPost = new HttpPost(URI.create(url));
 httpPost.setHeader("Content-type","text/xml; charset=ISO-8859-1");
ResponseHandler<String> responseHandler = new BasicResponseHandler();
String responseBody = httpclient.execute(httpPost, responseHandler);
}

catch(Exception e)
{
e.printstackTrace();
}

I am getting the exception as
java.lang.IllegalArgumentException: Illegal character in query at
index 41:
<name>Manoj</name>
<number>123</number>
<school>dmh</school>
can any one please help me how to solve this problem (sending the xml
file to server)?
Thanks,
Manoj.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to