<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Problem with Request on addFeature rest using httppost java in Developers Questions</title>
    <link>https://community.esri.com/t5/developers-questions/problem-with-request-on-addfeature-rest-using/m-p/462913#M3113</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;BR /&gt;I'm Trying to add a new Feature on my Server,but i'm having some problems&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;theres my code : &lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
ArrayList&amp;lt;NameValuePair&amp;gt; postParameters;
&amp;nbsp; postParameters = new ArrayList&amp;lt;NameValuePair&amp;gt;();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; postParameters.add(new BasicNameValuePair("features", gson.toJson(UploadTasks.get("addFeatures"))));
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; postParameters.add(new BasicNameValuePair("gdbVersion", "SDE.DEFAULT"));
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; postParameters.add(new BasicNameValuePair("rollbackOnFailure", "true"));
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; postParameters.add(new BasicNameValuePair("f", "pjson"));

HttpPost httppost = new HttpPost(urlsvaluepairs.getKey() + index + "/addFeatures");
&amp;nbsp; httppost.setEntity(new UrlEncodedFormEntity(postParameters));
&amp;nbsp; httppost.setHeader("Accept", "application/json");
&amp;nbsp; httppost.setHeader("Content-type", "application/json");
&amp;nbsp; try {
&amp;nbsp; String Res = httpclient.execute(httppost, new BasicResponseHandler());
&amp;nbsp; } catch (NetworkOnMainThreadException e) {
&amp;nbsp; e.printStackTrace();
&amp;nbsp; }
&amp;nbsp; //UpdateNewFeatures
&amp;nbsp; httppost = new HttpPost(urlsvaluepairs.getKey() + index + "/addFeatures?f=pjson");
&amp;nbsp; httppost.setEntity(new ByteArrayEntity(gson.toJson(UploadTasks.get("updateFeatures")).replace("\\", "").getBytes("UTF8")));
&amp;nbsp; httppost.setHeader("Accept", "application/json");
&amp;nbsp; httppost.setHeader("Content-type", "application/json");
&amp;nbsp; try {
&amp;nbsp; String Res = httpclient.execute(httppost, new BasicResponseHandler());
&amp;nbsp; } catch (NetworkOnMainThreadException e) {
&amp;nbsp; e.printStackTrace();
&amp;nbsp; }&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the error returned to me is :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unable to complete operation. Parser error: Some parameters could not be recognized.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;someone can help-me ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 20:34:02 GMT</pubDate>
    <dc:creator>MatheusCarvalho</dc:creator>
    <dc:date>2021-12-11T20:34:02Z</dc:date>
    <item>
      <title>Problem with Request on addFeature rest using httppost java</title>
      <link>https://community.esri.com/t5/developers-questions/problem-with-request-on-addfeature-rest-using/m-p/462913#M3113</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;BR /&gt;I'm Trying to add a new Feature on my Server,but i'm having some problems&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;theres my code : &lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
ArrayList&amp;lt;NameValuePair&amp;gt; postParameters;
&amp;nbsp; postParameters = new ArrayList&amp;lt;NameValuePair&amp;gt;();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; postParameters.add(new BasicNameValuePair("features", gson.toJson(UploadTasks.get("addFeatures"))));
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; postParameters.add(new BasicNameValuePair("gdbVersion", "SDE.DEFAULT"));
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; postParameters.add(new BasicNameValuePair("rollbackOnFailure", "true"));
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; postParameters.add(new BasicNameValuePair("f", "pjson"));

HttpPost httppost = new HttpPost(urlsvaluepairs.getKey() + index + "/addFeatures");
&amp;nbsp; httppost.setEntity(new UrlEncodedFormEntity(postParameters));
&amp;nbsp; httppost.setHeader("Accept", "application/json");
&amp;nbsp; httppost.setHeader("Content-type", "application/json");
&amp;nbsp; try {
&amp;nbsp; String Res = httpclient.execute(httppost, new BasicResponseHandler());
&amp;nbsp; } catch (NetworkOnMainThreadException e) {
&amp;nbsp; e.printStackTrace();
&amp;nbsp; }
&amp;nbsp; //UpdateNewFeatures
&amp;nbsp; httppost = new HttpPost(urlsvaluepairs.getKey() + index + "/addFeatures?f=pjson");
&amp;nbsp; httppost.setEntity(new ByteArrayEntity(gson.toJson(UploadTasks.get("updateFeatures")).replace("\\", "").getBytes("UTF8")));
&amp;nbsp; httppost.setHeader("Accept", "application/json");
&amp;nbsp; httppost.setHeader("Content-type", "application/json");
&amp;nbsp; try {
&amp;nbsp; String Res = httpclient.execute(httppost, new BasicResponseHandler());
&amp;nbsp; } catch (NetworkOnMainThreadException e) {
&amp;nbsp; e.printStackTrace();
&amp;nbsp; }&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the error returned to me is :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unable to complete operation. Parser error: Some parameters could not be recognized.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;someone can help-me ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 20:34:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/problem-with-request-on-addfeature-rest-using/m-p/462913#M3113</guid>
      <dc:creator>MatheusCarvalho</dc:creator>
      <dc:date>2021-12-11T20:34:02Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Request on addFeature rest using httppost java</title>
      <link>https://community.esri.com/t5/developers-questions/problem-with-request-on-addfeature-rest-using/m-p/462914#M3114</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, check for any text objects&amp;nbsp;that are being sent as unicode instead of as strings.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Oct 2016 21:00:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/problem-with-request-on-addfeature-rest-using/m-p/462914#M3114</guid>
      <dc:creator>GregStevenson</dc:creator>
      <dc:date>2016-10-06T21:00:26Z</dc:date>
    </item>
  </channel>
</rss>

