Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 73: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 74: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 75: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 76: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 77: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 78: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
package org.apache.geocode; import android.app.Activity; import android.os.Bundle; import android.util.Log; import android.view.View; import android.widget.ArrayAdapter; import android.widget.Button; import android.widget.EditText; import android.widget.ListView; import org.apache.commons.httpclient.Credentials; import org.apache.commons.httpclient.HttpClient; import org.apache.commons.httpclient.UsernamePasswordCredentials; import org.apache.commons.httpclient.auth.AuthPolicy; import org.apache.commons.httpclient.auth.AuthScope; import org.apache.commons.httpclient.methods.PostMethod; import javax.xml.parsers.SAXParser; import javax.xml.parsers.SAXParserFactory; import java.io.IOException; import java.util.List; /** * Uses the MapPoint Web Service to get details (of nearby locations/addresses) on a specified lat/long */ public class ReverseGeoCoder extends Activity implements View.OnClickListener { // UI elements private Button mLookup; private EditText mUserId; private EditText mPassword; private EditText mLatitude; private EditText mLongitude; public void onCreate(Bundle icicle) { super.onCreate(icicle); setContentView(R.layout.main); // Gather the troops mUserId = (EditText) findViewById(R.id.username); mPassword = (EditText) findViewById(R.id.password); mLatitude = (EditText) findViewById(R.id.latitude); mLongitude = (EditText) findViewById(R.id.longitude); mLookup = (Button) findViewById(R.id.lookup); // Set up a couple of button listeners mLookup.setOnClickListener(this); } // SOAP Request for the FindServiceSOAP.GetLocationInfo web service String soapRequestXML_1 = "n" + "n" + " n" + " n" + " "; String soapRequestXML_2 = " n" + " MapPoint.NAn" + " n" + " n" + " n" + ""; /** * When the user clicks on the lookup button we use the MapPoint SOAP API to fetch the * information of the specified latitude longitude. * * @param view */ public void onClick(View view) { String user = mUserId.getText().toString(); String password = mPassword.getText().toString(); String latitude = mLatitude.getText().toString(); String longitude = mLongitude.getText().toString(); // Use our customized Digest Auth scheme as per the following article // http://go.mappoint.net/MappointMPAC/def ... &id=J10002 AuthPolicy.registerAuthScheme(AuthPolicy.DIGEST, DigestMapPointScheme.class); String url = "http://findv3.staging.mappoint.net/Find-30/FindService.asmx"; HttpClient client = new HttpClient(); client.setConnectionTimeout(8000); Credentials credentials = new UsernamePasswordCredentials(user, password); client.getState().setCredentials(AuthScope.ANY, credentials); PostMethod postMethod = new PostMethod(url); // Construct a SOAP request by hand StringBuffer request = new StringBuffer(); request.append(soapRequestXML_1); request.append("").append(latitude).append(""); request.append("").append(longitude).append(""); request.append(soapRequestXML_2); postMethod.setRequestBody(request.toString()); postMethod.setRequestHeader("Content-Type", "text/xml; charset=utf-8"); postMethod.setRequestHeader("SOAPAction", ""http://s.mappoint.net/mappoint-30/GetLocationInfo""); int statusCode = 0; try { statusCode = client.executeMethod(postMethod); } catch (IOException e) { Log.d("ReverseGeoCoder", e.toString(), e); } Log.i("ReverseGeoCoder", "statusCode>>>" + statusCode); Log.i("ReverseGeoCoder", "statusLine>>>" + postMethod.getStatusLine()); // Parse the SOAP Response MyContentHandler myContentHandler = new MyContentHandler(); try { SAXParser parser = SAXParserFactory.newInstance().newSAXParser(); parser.parse(postMethod.getResponseBodyAsStream(), myContentHandler); } catch (Exception e) { Log.d("ReverseGeoCoder", e.toString(), e); } // Display the response details. List list = myContentHandler.getLocations(); String[] items = new String[list.size()]; for (int i = 0; i < list.size(); i++) { MyContentHandler.MyLocation location = (MyContentHandler.MyLocation) list.get(i); Log.i("ReverseGeoCoder", "Location : " + i); Log.i("ReverseGeoCoder", "Latitude : " + location.latitude); Log.i("ReverseGeoCoder", "Longitude : " + location.longitude); Log.i("ReverseGeoCoder", "Description : " + location.description); items[i] = location.description + " (geo:" + location.latitude + "," + location.longitude + ")"; } // Show the data in the list view ListView listView = (ListView) findViewById(R.id.data); listView.setAdapter(new ArrayAdapter(this, android.R.layout.simple_list_item_1, items)); postMethod.releaseConnection(); }