How to Delete/Update Notes from de API

How to Delete/Update Notes from de API

Hi there,

I'm writing a software based in Java to Update or Delete "n" Notes from the Contacts. There are no problems to INSERT the new ones or GET the old ones with insertRecords and getRelatedRecords methods. But I receive no response from updateRelatedRecords  when I try to use for update these notes. I attach you the following code:


import java.io.*;
import java.util.*;
import java.net.*;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.NameValuePair;
import org.apache.http.client.HttpClient;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.BufferedHttpEntity;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.message.BasicNameValuePair;


public class updateRecords
{
    public static void main(String a[])
    {   
        try   
        {

            String authtoken = "authtoken";
            String scope = "crmapi";
            String  recordId = "1014877000000219003";
            String newFormat = "1";
           
            String entityId = "1014877000000214007";
     
   //JUST FOT GET (WORKS FINE) 
            //String targetURL = " https://crm.zoho.com/crm/private/xml/Notes/getRelatedRecords";     
            //String parentModule = "Contacts";
                 
           
            String targetURL = " https://crm.zoho.com/crm/private/xml/Notes/updateRelatedRecords";         
            String relatedModule = "Contacts";
       
           
        //XML
            String xmlDataString = "<Contacts><row no=\"1\"><FL val=\"Note Content\">Testing</FL></row></Contacts>";
                        
           
            HttpClient httpclient = new DefaultHttpClient();
            HttpPost httppost = new HttpPost(targetURL);   
           
            //AÑADIR PARAMETROS
            List<NameValuePair> params = new ArrayList<NameValuePair>();
                params.add(new BasicNameValuePair("authtoken",authtoken));
                params.add(new BasicNameValuePair("scope",scope));
                params.add(new BasicNameValuePair("newFormat",newFormat));
                params.add(new BasicNameValuePair("id",recordId));
                params.add(new BasicNameValuePair("xmlData",xmlDataString));  
                params.add(new BasicNameValuePair("relatedModule",relatedModule));


       //       params.add(new BasicNameValuePair("parentModule",parentModule));
        
               
            httppost.setEntity(new UrlEncodedFormEntity(params));
       
            HttpResponse resp = httpclient.execute(httppost);
            HttpEntity ent = resp.getEntity();
       
            System.out.println(httppost);
           
          
              BufferedHttpEntity buffer = new BufferedHttpEntity(ent);
              InputStream iStream = buffer.getContent();
                              
              String aux = "";
                      
              BufferedReader r = new BufferedReader(new InputStreamReader(iStream));
              StringBuilder total = new StringBuilder();
              String line;
              while ((line = r.readLine()) != null) {
                aux += line;
              }           
             
             
            System.out.println(aux);
           
           
           
        }
        catch(Exception e)
        {
            e.printStackTrace();
        }   
    }
}


When I execute this code I receive no report error, just blank page.


My question is the following one. UpdateRelatedRecords support the entity NOTES?? There something wrong in my code? I need to use another method?

Thanks in advance!!