STUCK in Webservices
<p>i am parsing a web-services <code>UpdateLogComment</code>, which update comment. i got success in updation while i update comment first time.when i am set comment second time(in edittext add some new text with old) i got problem :-</p>

<pre><code>01-11 16:28:20.900: INFO/System.out(19084): comment is Comment GFFFFGC
01-11 16:28:20.990: WARN/System.err(19084): java.io.FileNotFoundException: http://MY_URL/Webservices/Service.asmx/UpdateLogComment?ScoreId=13172&amp;MachineName=DOTNETSERVER&amp;UserComment=Comment GFFFFGC
01-11 16:28:20.990: WARN/System.err(19084):     at org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:521)
01-11 16:28:20.990: WARN/System.err(19084):     at java.net.URL.openStream(URL.java:645)
01-11 16:28:20.990: WARN/System.err(19084):     at com.RecordingApp.commentPortion$2.onClick(commentPortion.java:83)
01-11 16:28:21.000: WARN/System.err(19084):     at android.view.View.performClick(View.java:2532)
01-11 16:28:21.000: WARN/System.err(19084):     at android.view.View$PerformClick.run(View.java:9277)
01-11 16:28:21.000: WARN/System.err(19084):     at android.os.Handler.handleCallback(Handler.java:587)
01-11 16:28:21.000: WARN/System.err(19084):     at android.os.Handler.dispatchMessage(Handler.java:92)
01-11 16:28:21.000: WARN/System.err(19084):     at android.os.Looper.loop(Looper.java:143)
01-11 16:28:21.000: WARN/System.err(19084):     at android.app.ActivityThread.main(ActivityThread.java:4196)
01-11 16:28:21.000: WARN/System.err(19084):     at java.lang.reflect.Method.invokeNative(Native Method)
01-11 16:28:21.010: WARN/System.err(19084):     at java.lang.reflect.Method.invoke(Method.java:507)
01-11 16:28:21.010: WARN/System.err(19084):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
01-11 16:28:21.010: WARN/System.err(19084):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
01-11 16:28:21.010: WARN/System.err(19084):     at dalvik.system.NativeStart.main(Native Method)
</code></pre>

<p><strong>Here is my code ::</strong> </p>

<pre><code>package com.RecordingApp;

import java.net.URL;
import java.util.ArrayList;

import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;

import org.xml.sax.InputSource;
import org.xml.sax.XMLReader;

import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.GridView;
import android.widget.Toast;

public class commentPortion extends Activity {

    Intent   intent_recordingclass;
    EditText ED_cmt_txvx;
    Button Btn_cmt_ok,
           Btn_cmt_cacel;

    String str_ScoreId,
           str_get_Comment;
    Intent Intent_Get_Val_frm_othr;
    int int_spnr_choose_item_first_or_sec;
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.comment);

        ED_cmt_txvx = (EditText)findViewById(R.id.cmment_comment_edtx);
        Btn_cmt_ok = (Button)findViewById(R.id.cmt_btn_ok);
        Btn_cmt_cacel = (Button)findViewById(R.id.cmt_cacel);
        Intent_Get_Val_frm_othr = getIntent();
        str_ScoreId = Intent_Get_Val_frm_othr.getStringExtra("scoreID");
        str_get_Comment = Intent_Get_Val_frm_othr.getStringExtra("usercomment");
        int_spnr_choose_item_first_or_sec= Intent_Get_Val_frm_othr.getIntExtra("spnritem",0);
        ED_cmt_txvx.setText(str_get_Comment);


        Btn_cmt_cacel.setOnClickListener(new View.OnClickListener() {
            public void onClick(View v) {


                                Intent itemsele = new Intent(commentPortion.this,LogList.class);
                                itemsele.putExtra("spnritem", int_spnr_choose_item_first_or_sec);
                                itemsele.putExtra("machineName", Recording.str_Machinename);
                                itemsele.putExtra("value", Recording.str_getValue);
                                startActivity(itemsele);
                                finish();
        }});

        Btn_cmt_ok.setOnClickListener(new View.OnClickListener() {
             public void onClick(View v) {
                 // Perform action on click
                 String Comment = ED_cmt_txvx.getText().toString();
                 System.out.println("comment is "+Comment);

                 if(Comment.equalsIgnoreCase(""))
                 {
                     Toast.makeText(getBaseContext(), "Comment is Blank", Toast.LENGTH_LONG).show();
                 } 
                 else
                 {
                 try
                 {

                 String sourceUrl1 = "http://My_url/Webservices/Service.asmx/UpdateLogComment?ScoreId="+str_ScoreId+"&amp;MachineName="+Recording.str_Machinename+"&amp;UserComment="+Comment+"";
                 URL sourceUrl = new URL(sourceUrl1);
                 SAXParserFactory spf = SAXParserFactory.newInstance();
                 SAXParser sp = spf.newSAXParser();
                 XMLReader xr = sp.getXMLReader();
                 commentHandler dataHandler = new commentHandler();
                 xr.setContentHandler(dataHandler);
                 xr.parse(new InputSource(sourceUrl.openStream()));
                 commentDataset dataset = dataHandler.getParsedcomment_DataSet();

                 String flag_sucess_send_commnt = dataset.getboolean1();
                 AlertDialog.Builder alertbox = new AlertDialog.Builder(commentPortion.this);
                System.out.println("flag_sucess_send_commnt"+flag_sucess_send_commnt);
                 if(flag_sucess_send_commnt.equalsIgnoreCase("true"))
                 {

                    alertbox.setTitle("Message");
                    alertbox.setMessage("Comment added Sucessfully");
                    alertbox.setPositiveButton("OK",
                            new DialogInterface.OnClickListener() {
                                public void onClick(DialogInterface arg0, int arg1) {

                                    Intent itemsele = new Intent(commentPortion.this,LogList.class);
                                    itemsele.putExtra("spnritem", int_spnr_choose_item_first_or_sec);
                                    itemsele.putExtra("machineName", Recording.str_Machinename);
                                    itemsele.putExtra("value", Recording.str_getValue);
                                    startActivity(itemsele);
                                    finish();
                                }
                            });

                    alertbox.show();


                 }
                 else
                 {
                     Toast.makeText(getBaseContext(), "Comment not Update,Please Try Again", Toast.LENGTH_LONG).show();

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


    }


}
</code></pre>
