-1

I've got this http_post xml sending in my android project:

try {
            xml_input();
        } catch (IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
            Log.e("Hiba!", "Xml_input fgv hivasa");
        }

        // TODO Auto-generated method stub
        HttpPost httppost = new HttpPost("http://users.atw.hu/festivale/xml_post.php");
        StringEntity se;
        try {
            se = new StringEntity(globalconstants.xml_out, HTTP.UTF_8);
            se.setContentType("text/xml");
            httppost.setHeader("Content-Type",
                    "application/soap+xml;charset=UTF-8");
            httppost.setEntity(se);

            HttpClient httpclient = new DefaultHttpClient();
            BasicHttpResponse httpResponse = (BasicHttpResponse) httpclient
                    .execute(httppost);

            HttpEntity r_entity = httpResponse.getEntity();
            String xmlString = EntityUtils.toString(r_entity);

            System.err.println("Error...." + xmlString);
        } catch (Exception e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
  • How can i display this in on my php site?
  • And is this a good xml sending if i want some rules etc. sending to a server?
ShuklaSannidhya
  • 8,572
  • 9
  • 32
  • 45
david
  • 89
  • 11
  • what exactly do you want to display? – eis Mar 11 '13 at 15:07
  • possible duplicate of [Php reading xml in post request](http://stackoverflow.com/questions/2068875/php-reading-xml-in-post-request) – Quentin Mar 11 '13 at 15:07
  • just pass your xml String in a POST Parameter , and then display it in PHP via : `$xml = $_POST['yourParameterXML']; echo $xml;` – Houcine Mar 11 '13 at 15:08
  • that's what i don't understand what is the my parameter? because i do not send any parameters not like this:List params = new ArrayList(); – david Mar 11 '13 at 15:09

1 Answers1

1

You can access http_post data using $_POST superglobal associative array in php. Like-

echo $_POST['foo'];
ShuklaSannidhya
  • 8,572
  • 9
  • 32
  • 45