Issue with Ksoap webservices
<p>I am developing one app in which i have parse web services trough Ksoap. in which i am parse object to services and get result as object but here is nullpointer error are raise ...can you please help me out this..</p>

<p><strong>ERROR:</strong></p>

<pre><code>06-07 18:48:37.190: W/System.err(1508): java.lang.NullPointerException
06-07 18:48:37.200: W/System.err(1508):     at com.KsoapDemo.KsoapDemoActivity.InsertCustomerDetails(KsoapDemoActivity.java:271)
06-07 18:48:37.200: W/System.err(1508):     at com.KsoapDemo.KsoapDemoActivity.onCreate(KsoapDemoActivity.java:59)
06-07 18:48:37.200: W/System.err(1508):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
06-07 18:48:37.210: W/System.err(1508):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
06-07 18:48:37.210: W/System.err(1508):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
06-07 18:48:37.210: W/System.err(1508):     at android.app.ActivityThread.access$2300(ActivityThread.java:125)
06-07 18:48:37.210: W/System.err(1508):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
06-07 18:48:37.234: W/System.err(1508):     at android.os.Handler.dispatchMessage(Handler.java:99)
06-07 18:48:37.234: W/System.err(1508):     at android.os.Looper.loop(Looper.java:123)
06-07 18:48:37.234: W/System.err(1508):     at android.app.ActivityThread.main(ActivityThread.java:4627)
06-07 18:48:37.234: W/System.err(1508):     at java.lang.reflect.Method.invokeNative(Native Method)
06-07 18:48:37.240: W/System.err(1508):     at java.lang.reflect.Method.invoke(Method.java:521)
06-07 18:48:37.240: W/System.err(1508):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
06-07 18:48:37.240: W/System.err(1508):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
06-07 18:48:37.240: W/System.err(1508):     at dalvik.system.NativeStart.main(Native Method)
</code></pre>

<p><strong>Code:</strong></p>

<pre><code>private void InsertCustomerDetails(String METHOD_NAME1,
            int insertcustomerdetails2, String Responce,
            String voucher, String passcode, int i) {


        try {
            String NAMESPACE = "http://tempuri.org/";
            //String METHOD_NAME = "GenereateVoucher";
            String METHOD_NAME = "InsertCustomerDetails" ;
            String SOAP_ACTION = "http://tempuri.org/"+METHOD_NAME;
            String URL = ("http://192.192.6.236:9000/TreasurePhoneService.asmx");// "http://eyetrends.jobsoninternetsolutions.com/FrameData_Service.asmx";

            ManualPaymentProcessResult mp = new ManualPaymentProcessResult();

            /*mp.ManualPaymentProcessResult1(true, "0", 0, "", 1, "", "", 0.00,
                    0.00, 0.00, 0.00, 1, "0", "0", "", "", 1, "", "", "", "",
                    "", "", 0, 0, 0, true, true, true, "", "", "", "", "", "",
                    "", "", "", "", "", 0, true, "", "", 0, "", "", "", "", 0,
                    "0001-01-01T00:00:00", false);*/
            mp.IsPrimaryAgentId = Boolean.parseBoolean(GetString(Responce,"IsPrimaryAgentId"));
            Log.i("TAG", "IsPrimaryAgentId"+mp.IsPrimaryAgentId);
            mp.AgentId = GetString(Responce,"AgentId");
            Log.i("TAG", "AgentId"+mp.AgentId);
            mp.AggregateAttempts = Integer.parseInt(GetString(Responce,"AggregateAttempts"));
            Log.i("TAG", "AggregateAttempts"+mp.AggregateAttempts);
            mp.Amount = Double.parseDouble(GetString(Responce,"Amount"));
            Log.i("TAG", "Amount"+mp.Amount);
            mp.AmountApproved = Double.parseDouble(GetString(Responce,"AmountApproved"));
            Log.i("TAG", "AmountApproved"+mp.AmountApproved);
            mp.AmountDifference = Double.parseDouble(GetString(Responce,"AmountDifference"));
            Log.i("TAG", "AmountDifference"+mp.AmountDifference);
            mp.AmountUserEntered = Double.parseDouble(GetString(Responce,"AmountUserEntered"));
            Log.i("TAG", "AmountUserEntered"+mp.AmountUserEntered);
            mp.Cashier = GetString(Responce,"Cashier");
            Log.i("TAG", "Cashier"+mp.Cashier);
            mp.CurrencyName = GetString(Responce,"CurrencyName");
            Log.i("TAG", "CurrencyName"+mp.CurrencyName);
            mp.CurrencySymbol=GetString(Responce,"CurrencySymbol");
            Log.i("TAG", "CurrencySymbol"+mp.CurrencySymbol);

            /*if(Choice ==InsertCustomerDetails)
            {
                mp.CustomerName = CustomerName;
                mp.CustomerEmailID=CustomerEmailID;
            }else
            {

                mp.CustomerEmailID=GetString(Responce,"CustomerEmailID");
                mp.CustomerName =GetString(Responce,"CustomerName");
            }*/

            mp.CustomerEmailID=GetString(Responce,"CustomerEmailID");
            Log.i("TAG", "CustomerEmailID"+mp.CustomerEmailID);
            mp.CustomerName =GetString(Responce,"CustomerName");
            Log.i("TAG", "CustomerName"+mp.CustomerName);


            mp.CustomerNameAttempts=Integer.parseInt(GetString(Responce,"CustomerNameAttempts"));
            Log.i("TAG", "CustomerNameAttempts"+mp.CustomerNameAttempts);
            mp.EmailBody= GetString(Responce,"EmailBody");
            Log.i("TAG", "EmailBody"+mp.EmailBody);
            mp.EmailId=GetString(Responce,"EmailId");
            Log.i("TAG", "EmailId"+mp.EmailId);
            mp.Error=GetString(Responce,"Error");
            Log.i("TAG", "Error"+mp.Error);
            mp.ErrorText=GetString(Responce,"ErrorText");
            Log.i("TAG", "ErrorText"+mp.ErrorText);
            mp.IdNumber= GetString(Responce,"IdNumber");
            Log.i("TAG", "IdNumber"+mp.IdNumber);
            mp.IdType=GetString(Responce,"IdType");
            Log.i("TAG", "IdType"+mp.IdType);
            mp.InvoiceID=GetString(Responce,"InvoiceID");
            Log.i("TAG", "InvoiceID"+mp.InvoiceID);
            mp.IsCustomerInsertSucess = Boolean.parseBoolean(GetString(Responce,"IsCustomerInsertSucess"));
            Log.i("TAG", "IsCustomerInsertSucess"+mp.IsCustomerInsertSucess);
            mp.IsManualPayment = Integer.parseInt(GetString(Responce,"IsManualPayment"));
            Log.i("TAG", "IsManualPayment"+mp.IsManualPayment);
            mp.IsPrimaryAgentId = Boolean.parseBoolean(GetString(Responce,"IsPrimaryAgentId"));
            Log.i("TAG", "IsPrimaryAgentId"+mp.IsPrimaryAgentId);
            mp.isQuery1Executed = Boolean.parseBoolean(GetString(Responce,"isQuery1Executed"));
            Log.i("TAG", "isQuery1Executed"+mp.isQuery1Executed);
            mp.isQuery2Executed = Boolean.parseBoolean(GetString(Responce,"isQuery2Executed"));
            Log.i("TAG", "isQuery2Executed"+mp.isQuery2Executed);
            mp.MerchantID=Integer.parseInt(GetString(Responce,"MerchantID"));
            Log.i("TAG", "MerchantID"+mp.MerchantID);
            mp.MerchantName=GetString(Responce,"MerchantName");
            Log.i("TAG", "MerchantName"+mp.MerchantName);
            mp.MerchantTransactionID=Integer.parseInt(GetString(Responce,"MerchantTransactionID"));
            Log.i("TAG", "MerchantTransactionID"+mp.MerchantTransactionID);
            mp.MerchantTransactionSequenceID=Integer.parseInt(GetString(Responce,"MerchantTransactionSequenceID"));
            Log.i("TAG", "MerchantTransactionSequenceID"+mp.MerchantTransactionSequenceID);
            mp.NavigatePageValue=Integer.parseInt(GetString(Responce,"NavigatePageValue"));
            Log.i("TAG", "NavigatePageValue"+mp.NavigatePageValue);
            mp.Passcode=passcode;
            Log.i("TAG", "Passcode"+mp.Passcode);
            mp.PassCode2=GetString(Responce,"PassCode2");
            Log.i("TAG", "PassCode2"+mp.PassCode2);
            mp.PassCode3=GetString(Responce,"PassCode3");
            Log.i("TAG", "PassCode3"+mp.PassCode3);
            mp.Password=GetString(Responce,"Password");
            Log.i("TAG", "Password"+mp.Password);
            mp.Payer=GetString(Responce,"Payer");
            Log.i("TAG", "Payer"+mp.Payer);
            //Payer = GetString(Responce,"Payer");

            mp.PrimaryAgentId=GetString(Responce,"PrimaryAgentId");
            Log.i("TAG", "PrimaryAgentId"+mp.PrimaryAgentId);
            mp.PrimaryCurrencyCode=GetString(Responce,"PrimaryCurrencyCode");
            Log.i("TAG", "PrimaryCurrencyCode"+mp.PrimaryCurrencyCode);
            mp.ProductID=GetString(Responce,"ProductID");
            Log.i("TAG", "ProductID"+mp.ProductID);
            mp.Query1Attempts=Integer.parseInt(GetString(Responce,"Query1Attempts"));
            Log.i("TAG", "Query1Attempts"+mp.Query1Attempts);
            mp.QueryType=GetString(Responce,"QueryType");
            Log.i("TAG", "QueryType"+mp.QueryType);
            mp.RedirectPage=Boolean.parseBoolean(GetString(Responce,"RedirectPage"));
            Log.i("TAG", "RedirectPage"+mp.RedirectPage);
            mp.ResponseType=Integer.parseInt(GetString(Responce,"ResponseType"));
            Log.i("TAG", "ResponseType"+mp.ResponseType);
            mp.ReturnURL=GetString(Responce,"ReturnURL");
            Log.i("TAG", "ReturnURL"+mp.ReturnURL);
            mp.SecondaryAgentId=GetString(Responce,"SecondaryAgentId");
            Log.i("TAG", "SecondaryAgentId"+mp.SecondaryAgentId);
            mp.SecondaryCurrencyCode=GetString(Responce,"SecondaryCurrencyCode");
            Log.i("TAG", "SecondaryCurrencyCode"+mp.SecondaryCurrencyCode);
            mp.SiteUrl=GetString(Responce,"SiteUrl");
            Log.i("TAG", "SiteUrl"+mp.SiteUrl);
            //String str_date=GetString(Responce,"TransactionDate");
            String str_date="2012-06-07T06:02:00";
            //yyyy-MM-dd'T'HH:mm:ss
              DateFormat formatter ; 
              Date date ; 
              formatter = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");
              date = (Date)formatter.parse(str_date);  
            mp.TransactionDate= date;
            Log.i("TAG", "TransactionDate"+mp.TransactionDate);
            /***********************NEW 6 Field*********************/
            mp.NumberInWords = GetString(Responce,"NumberInWords");
            Log.i("TAG", "NumberInWords"+mp.NumberInWords);
            mp.MerchantCompany = GetString(Responce,"MerchantCompany");
            Log.i("TAG", "MerchantCompany"+mp.MerchantCompany);
            mp.InvoiceNumber = GetString(Responce,"InvoiceNumber");
            Log.i("TAG", "InvoiceNumber"+mp.InvoiceNumber);
            mp.OverPaidAmount = Double.parseDouble(GetString(Responce,"OverPaidAmount"));
            Log.i("TAG", "OverPaidAmount"+mp.OverPaidAmount);
            mp.InsufficientAmount = Double.parseDouble(GetString(Responce,"InsufficientAmount"));
            Log.i("TAG", "InsufficientAmount"+mp.InsufficientAmount);
            mp.OverPaymentForEmail  = GetString(Responce,"OverPaymentForEmail");
            Log.i("TAG", "OverPaymentForEmail"+mp.OverPaymentForEmail);
            /***********************************************************/


            mp.TransCode=Integer.parseInt(GetString(Responce,"TransCode"));
            Log.i("TAG", "TransCode"+mp.TransCode);
            mp.txtAmtIsVisible=Boolean.parseBoolean(GetString(Responce,"txtAmtIsVisible"));
            Log.i("TAG", "txtAmtIsVisible"+mp.txtAmtIsVisible);
            mp.UserID=GetString(Responce,"UserID");
            Log.i("TAG", "UserID"+mp.UserID);
            mp.Voucher=voucher;
            Log.i("TAG", "Voucher"+mp.Voucher);
            mp.Voucher2=GetString(Responce,"Voucher2");
            Log.i("TAG", "Voucher2"+mp.Voucher2);
            mp.Voucher3=GetString(Responce,"Voucher3");
            Log.i("TAG", "Voucher3"+mp.Voucher3);

            SoapObject Request = new SoapObject(NAMESPACE, METHOD_NAME);
            //Log.i(TAG, "mp"+mp);
            PropertyInfo pi1 = new PropertyInfo();
            pi1.setName("objMaualTransInfo");
            pi1.setValue(mp);
            pi1.setType(mp.getClass());
            Request.addProperty(pi1);

            SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(
                    SoapEnvelope.VER11);
            envelope.dotNet = true;
            envelope.setOutputSoapObject(Request);

            envelope.addMapping(NAMESPACE, "ManualTransactionInfo",
                    new ManualPaymentProcessResult().getClass());
            AndroidHttpTransport androidHttpTransport = new AndroidHttpTransport(
                    URL);
            /*
             * Call the web service and retrieve result ... how luvly &lt;3
             */
            MarshalDate mdouble = new MarshalDate();
            mdouble.register(envelope);

            MarshalDouble mdate = new MarshalDouble();
            mdate.register(envelope);

            androidHttpTransport.call(SOAP_ACTION, envelope);
            SoapObject response = (SoapObject) envelope.getResponse();
            Log.i("TAG", "soapResponse InsertCustomer=&gt;"+i + response);
            strInsertCustomerDetailsResponce = envelope.getResponse().toString();




            // Log.i("TAG", "soapResponse recent=&gt;" + envelope.getResponse());
        } catch (Exception e) {
            soapResponseObject = null;
            e.printStackTrace();
            Log.e(TAG, "niraliwebservice() Exception=&gt;" + e);
        }
</code></pre>
